[Distutils] getting the local site_packages

Hanno Schlichting hanno at hannosch.eu
Thu Feb 2 00:16:57 CET 2012


On Wed, Feb 1, 2012 at 4:08 PM, Andrea Crotti <andrea.crotti.0 at gmail.com> wrote:
> With something like this
> site_packages = pkg_resources.get_python_lib()
>
> I get the python global path of the site-packages directory, is there a way
> to get also
> the local one, which for example on Linux might be something like
>
> $HOME/.local/lib/site-packages

What does import site; site.getusersitepackages() return - as per
http://docs.python.org/library/site.html#site.getusersitepackages

Hanno


More information about the Distutils-SIG mailing list