getting the local site_packages
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 ? Thanks, Andrea
On Wed, Feb 1, 2012 at 4:08 PM, Andrea Crotti
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
On 02/01/2012 11:16 PM, Hanno Schlichting wrote:
On Wed, Feb 1, 2012 at 4:08 PM, Andrea Crotti
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
Sigh, the paleolitic python 2.5 didn't have that function.. but I guess it should be defined somewhere anyway, where else could it be?
On Thu, Feb 2, 2012 at 5:20 AM, Andrea Crotti
Sigh, the paleolitic python 2.5 didn't have that function.. but I guess it should be defined somewhere anyway, where else could it be?
Not in 2.5, since 2.5 doesn't support user site packages. (Except maybe on OS X, but in that case I'm not sure where it's defined.)
participants (3)
-
Andrea Crotti
-
Hanno Schlichting
-
PJ Eby