User python packages removed after upgrading to Fedora 41

I noticed my python packages were gone after upgrading. I had to re-install each dependency with pip.

I assume that these are pip-installed in your home directory. Take a look in ~/.local/lib — you will probably see something like this:

$ ls -lv
drwxr-xr-x. 1 mattdm mattdm 26 Aug  1  2021 python3.9
drwxr-xr-x. 1 mattdm mattdm 26 Oct 28  2021 python3.10
drwxr-xr-x. 1 mattdm mattdm 26 Sep 22  2022 python3.11
drwxr-xr-x. 1 mattdm mattdm 26 Nov  5  2023 python3.12
drwxr-xr-x. 1 mattdm mattdm 26 Oct 31 10:23 python3.13

That’s because they’re tied to the minor version of python, which generally goes up every Fedora Linux release. We also include compatibility versions of those older releases, so you can keep with an older release if you want. The generally-accepted best practice for dealing with this is to set up a virtenv for each of your Python projects. (Or stuff it into a container.)

3 Likes

Okay, thank you both. That makes sense.

I also found this:

3 Likes