[Testing Update] 2021-12-28 - Systemd 250, AMDVlk 2021.Q4.3, LibGLVND 1.4.0

EDIT2 at 05:40 UTC; I’ve updated the pip section of the wiki post.

Thanks for that info, i hadn’t noticed (there are > 200 packages in my pip list).

It looks like

  • pip does not get its list from its own cache, but by reading ‘egg-info’ and ‘dist-info’ directories (in the site-packages’ directories)
  • some python packages are installed by the OS (pacman) not pip, but many of these have ‘egg-info’ dirs, so pip finds them.

It’s another good reason to look at pip lists and use them manually
(don’t automatically re-install everything with the -r option).

About the examples below:

  • shiboken6 and pacman-mirrors were (i guess) installed by the OS (via pacman packages); there is ‘egg-info’, which i guess was put there by pacman, not pip; pip finds it anyway, of course; (there are many others like this);
  • samba must have been installed by the OS (as a pacman package); it does not have ‘egg-info’, so pip does not find it;
  • btrfsutil was not found by pacman -Q, and has ‘egg-info’, but was NOT installed via pip. See next para.

ADDED at UTC 2021-12-31 23:10 [AEST 2022-01-01 09:10]
‘btrfsutil’ is not at PyPI, and I have never used pip to install from anywhere else.
The Arch btrfs-progs package lists in its dependencies
“python (optional) - libbtrfsutil python bindings”,
so I guess ‘btrfsutil’ was installed by the ‘btrfs-progs’ package.
Because ‘btrfsutil’ is not itself a package, ‘pacman -Qi btrfsutil’ does not show it.

There seems to be no limit on where python packages with ‘egg-info’ can come from,
and this adds to the reasons for not installing into system python via pip.
If, with pip installs, you always use ‘–user’,
your own packages will all be in ~/.local/lib/pythonX.Y/site-packages/,
and you can simply look there to see what you need to manually re-install
when the annual Python upgrade comes around again.

EDIT1 at 04:40 UTC: added paths from directory listings. [my local TZ is +10]

[jh@SSD2 211231 14:31:49 ~]$ ll -d /usr/lib/python3.9/site-packages/pacman_mirrors*
/usr/lib/python3.9/site-packages/pacman_mirrors-4.23.1-py3.9.egg-info/
/usr/lib/python3.9/site-packages/pacman_mirrors/
[jh@SSD2 211231 12:16:53 ~]$ pacman -Qi pacman-mirrors | grep Version
Version         : 4.23.1-5
[jh@SSD2 211231 12:16:58 ~]$ sudo pip freeze | grep pacman-mirrors
pacman-mirrors==4.23.1

[jh@SSD2 211231 14:31:54 ~]$ ll -d /usr/lib/python3.9/site-packages/shiboken6*
/usr/lib/python3.9/site-packages/shiboken6_generator/
/usr/lib/python3.9/site-packages/shiboken6.egg-info/
/usr/lib/python3.9/site-packages/shiboken6/
[jh@SSD2 211231 12:46:49 ~]$ sudo pip freeze | grep shiboken6
shiboken6==6.2.2
[jh@SSD2 211231 12:47:01 ~]$ pacman -Qi shiboken6 | grep Version
Version         : 6.2.2-1

[jh@SSD2 211231 14:32:01 ~]$ ll -d /usr/lib/python3.9/site-packages/btrfsutil*
/usr/lib/python3.9/site-packages/btrfsutil.cpython-39-x86_64-linux-gnu.so*
/usr/lib/python3.9/site-packages/btrfsutil-5.15.1-py3.9.egg-info/
[jh@SSD2 211231 12:42:56 ~]$ sudo pip freeze | grep btrfsutil
btrfsutil==5.15.1
[jh@SSD2 211231 12:43:02 ~]$ pacman -Qi btrfsutil | grep Version
error: package 'btrfsutil' was not found

[jh@SSD2 211231 14:32:09 ~]$ ll -d /usr/lib/python3.9/site-packages/samba*
/usr/lib/python3.9/site-packages/samba/
[jh@SSD2 211231 12:59:02 ~]$ sudo pip freeze | grep samba
(found nothing)
[jh@SSD2 211231 12:59:05 ~]$ pacman -Qi samba | grep Version
Version         : 4.15.3-1
1 Like