02 aprile 2012

Where are my site-packages stored?

The location of the site-packages directory depends on the operating system, and the location in which Python was installed. To find out your system's site-packages location, execute the following:

python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
(Note that this should be run from a shell prompt, not a Python interactive prompt.)
Some Debian-based Linux distributions have separate site-packages directories for user-installed packages. The command listed above will give you the system's site-packages, the user's directory can be found in /usr/local/lib/ instead of /usr/lib/.

Tondo è bello...

Tondo è bello...