[Tutor] get_python_lib()

Vishnu Mohan vishnu at montalvosystems.com
Wed Jan 16 07:16:34 CET 2008

Kakada wrote:
> Hi list,
> I was just wondering why the below function return different location on 
> different machine?
> import distutils.sysconfig
> distutils.sysconfig.get_python_lib()
> On my computer:
> '/usr/lib/python2.5/site-packages'
> On my friend's computer:
> '/usr/local/lib/python2.5/site-packages'
> What is the difference between these two? Note: I have both location on my filestem.

Most of the packages will install itself, by default, into 
But most distibutions will put their software into 
/usr/lib/python$VER/site-packages/. May be your friend might
have changed $PYTHONHOME like env's so that it is pointing to /usr/local 
or while installing the python he might have
set --prefix to the /usr/local/....

-VishnuMohan, Montalvo Systems.

More information about the Tutor mailing list