Does the system install Python packages to "/.local/lib/"?

I’ve over 1GB of packages in ~/.local/lib/python3.9/ (most used by tensorflow). Note that Python 3.10 is the current version. In the past I’ve used pip to install some packages and have since moved exclusively to virtual environments.

I installed Fedora 35 workstation from scratch in a VM and the path ~/.local/lib/ doesn’t exist after updating the system and installing a Python package (yt-dlp) from the repo.

Is the said path used by the system and any software in the Fedora repos (which follow the packaging guidelines)? Can I safely wipe with rm -r (or rm -rf if necessary)?

2 Likes

You can safely delete those files. If you do not use a virtualenv, pip installs packages into ~/.local/lib.

dnf will only ever install packages in the system folders, so /usr/lib/python.. and so on.

2 Likes