Comment 2 for bug 248558

Revision history for this message
Stephen Pascoe (stephen-pascoe) wrote :

The patch almost completely fixes the problem for me. A reference to global site-packages doesn't get added to sys.path.

Delving into SuSE's python installation I'm not surprised ... site.py has been patched to add '/usr/local' to the list of prefixes. I hope to report this to SuSE and will reference it here when done.

Two invocations of python follow. One via virtualenv, the other not. Note the former doesn't include /usr/local/lib64/python2.5/site-packages.

.....

(myenv2)spascoe@bond:~/host/bond/expt> python
Python 2.5.1 (r251:54863, Sep 21 2007, 22:46:31)
[GCC 4.2.1 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, pprint
>>> pprint.pprint(sys.path)
['',
 '/disks/bond1/spascoe/expt/myenv2/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg',
 '/disks/bond1/spascoe/expt',
 '/disks/bond1/spascoe/expt/myenv2/lib/python25.zip',
 '/disks/bond1/spascoe/expt/myenv2/lib64/python2.5',
 '/disks/bond1/spascoe/expt/myenv2/lib64/python2.5/plat-linux2',
 '/disks/bond1/spascoe/expt/myenv2/lib64/python2.5/lib-tk',
 '/disks/bond1/spascoe/expt/myenv2/lib64/python2.5/lib-dynload',
 '/usr/lib/python2.5',
 '/usr/lib64/python2.5',
 '/usr/lib64/python2.5/lib-tk',
 '/disks/bond1/spascoe/expt/myenv2/lib/python2.5/site-packages']
>>>
(myenv2)spascoe@bond:~/host/bond/expt> /usr/bin/python
Python 2.5.1 (r251:54863, Sep 21 2007, 22:46:31)
[GCC 4.2.1 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, pprint
>>> pprint.pprint(sys.path)
['',

 ... eggs-snipped...

 '/usr/local/lib64/python2.5/site-packages/setuptools-0.6c9-py2.5.egg',
 '/disks/bond1/spascoe/expt',
 '/usr/lib/python25.zip',
 '/usr/lib64/python2.5',
 '/usr/lib64/python2.5/plat-linux2',
 '/usr/lib64/python2.5/lib-tk',
 '/usr/lib64/python2.5/lib-dynload',
 '/usr/lib64/python2.5/site-packages',
 '/usr/lib64/python2.5/site-packages/Numeric',
 '/usr/lib64/python2.5/site-packages/gtk-2.0',
 '/usr/local/lib64/python2.5/site-packages']
>>>