I'm using Ubuntu and noticed these two directories:
/usr/local/lib/python2.6/dist-packages
/usr/lib/python2.6/dist-packages
Which one should be used for installing Python packages?
Thanks.
For the question in the topic: /usr/local/lib is meant for libs that you installed (compiled) yourself. /usr/lib is for libraries your distribution provides. You might want to read about the Filesystem Hierarchy Standard (FHS) for more info.
/usr/lib/python3/dist-packages contains non-host-specific modules installed by the system with the package manager, for example on Ubuntu with sudo apt install safeeyes .
Ubuntu packages in .deb
format should use
/usr/lib/python2.6/dist-packages
Files you install outside the package management, i.e. files dpkg
is unaware of, should go into
/usr/local/lib/python2.6/dist-packages
Se also the file system hierarchy standard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With