![](https://seccdn.libravatar.org/avatar/541f0424df99fb299635f2b0c46454b0.jpg?s=120&d=mm&r=g)
Pascal Bleser wrote:
What just makes me wonder... what's the point of installing Python libraries under /usr/local when the default sys.path doesn't include that directory ?
$ python Python 2.4.2 (#1, Apr 9 2006, 16:08:21) [GCC 4.1.0 (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import sys print sys.path ['', '/usr/lib/python24.zip', '/usr/lib64/python2.4', '/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk', '/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages', '/usr/lib64/python2.4/site-packages/Numeric', '/usr/lib64/python2.4/site-packages/gtk-2.0']
No /usr/local/lib64/python2.4/site-packages in there...
It will appear in sys.path only only if the directory exists: # mkdir -p /usr/local/lib64/python2.4/site-packages/ $ python -c 'import sys; print sys.path;' ['', '/usr/lib/python24.zip', '/usr/lib64/python2.4', '/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk', '/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages', '/usr/local/lib64/python2.4/site-packages'] ^^^^^^^ To be honest, I don't know why it works this way (my python knowledge is quite limited), ask jmatejek@suse.cz if you have problems with the current way it works: * Mon Feb 27 2006 - jmatejek@suse.cz - implemented /usr/local path schemes for bug #149809 - python now recognizes packages in /usr/local/lib/python2.4 - distutils install by default into /usr/local/lib/python2.4/site-packages - on 64bit systems that is of course lib64 Michal