Why do I have both /usr/lib/python3 and /usr/lib/python3.8?

Anssi Saari as at sci.fi
Wed Dec 30 02:28:14 EST 2020


Chris Green <cl at isbd.net> writes:

> Why are there both /usr/lib/python3 and /usr/lib/python3.8 on my
> x[ubuntu] system?

While it's more of an Ubuntu (or Debian) question better asked in some
relevant Linux forum, in the end it's because some package managers
decided to do that. You can use commands like these to see which
packages put stuff in which directory:

dpkg -S /usr/lib/python3.8
dpkg -S /usr/lib/python3

On my Debian system the corresponding output looks like this:

$ dpkg -S /usr/lib/python3.7
python3.7, libpython3.7-minimal:amd64, python3-tk:amd64,
libpython3.7-dev:amd64, libpython3.7-stdlib:amd64, libpython3.7:amd64,
python3-distutils, python3-lib2to3: /usr/lib/python3.7

$ dpkg -S /usr/lib/python3          
python3-scipy, python3-opengl, python3-statsmodels, iotop,
python3-reportlab-accel:amd64, python3-magic, python3-pkg-resources,
python3-kiwisolver, python3.7, python3-pandas-lib, python3-kerberos,
python3-lz4, python3-renderpm:amd64, python3-numexpr,
python3-cffi-backend, python3-crypto, python3-tables, python3-rencode,
python3-gi, python3-dbus, devscripts, python3-gpg, python3-pyasn1,
python3-py, python3-eyed3, pdfarranger, python3-pip, python3-virtualenv,
xpra, python3-pandas, python3-pil:amd64, python3-requests,
python3-urllib3, python3-psutil, python3-paramiko, python3-netifaces,
python3-patsy, python3-gssapi, python3-sklearn, python3-cycler,
python3-sip, python3-cairo:amd64, python3-six, python3-chardet,
python3-nose, python3-debian, python3-wheel, python3-attr,
python3-soupsieve, python3-bcrypt, python3-bs4, python3-sklearn-lib,
python3-scour, python3-setuptools, python3-entrypoints,
python3-gi-cairo, python3-cups, python3-keyrings.alt, python3-pluggy,
python3-tz, python3-ifaddr, python3-joblib, python3-cvxopt,
python3-secretstorage, python3-reportlab, python3-more-itertools,
python3-keyring, python3-asn1crypto, python3-html5lib, python3-dns,
python3-decorator, python3-dateutil, meson, python3-pexpect,
python3-idna, python3-seaborn, lsb-release, python3-numpy,
python3-brotli, python3-tables-lib, python3-lxml:amd64, python3-pytest,
python3-simplejson, python3-nacl, python3-zeroconf, python3-xdg,
python3-libvoikko, python3-gst-1.0, python3-pypdf2, python3-evdev,
python3-matplotlib, python3-statsmodels-lib, python3-cryptography,
python3-certifi, python3-atomicwrites, python3-pyparsing,
python3-ptyprocess, python3-webencodings, piper, python3-uno,
python3-apt, python3-setproctitle:amd64, hplip: /usr/lib/python3

So I'd say as a rule stuff relevant to the specific version of python
goes in the specific version directory (i.e. /usr/lib/python3.8 in your
case) and python software packages in general go in /usr/lib/python3.



More information about the Python-list mailing list