Comment 8 for bug 248558

Revision history for this message
In , Thomas (thomas-redhat-bugs) wrote :

Description of problem:
Inside a virtual environment created with the 'virtualenv' command, the /usr/lib64/python2.5/site-packages path is missing.

Version-Release number of selected component (if applicable):
python-virtualenv-1.3-1.fc9.noarch

Steps to Reproduce:
1. Create a virtual environment like with 'virtualenv /tmp/env'
2. Compare paths outside and inside using
   "python -c 'import sys, pprint; pprint.pprint(sys.path);'" and
   "/tmp/env/bin/python -c 'import sys, pprint; pprint.pprint(sys.path);'"
   respectively.

Actual results:
% python -c 'import sys, pprint; pprint.pprint(sys.path);'
['',
 '/usr/lib64/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/PIL',
 '/usr/lib64/python2.5/site-packages/gst-0.10',
 '/usr/lib64/python2.5/site-packages/gtk-2.0',
 '/usr/lib/python2.5/site-packages']

% /tmp/env/bin/python -c 'import sys, pprint; pprint.pprint(sys.path);'
['',
 '/tmp/env/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg',
 '/tmp/env/lib64/python25.zip',
 '/tmp/env/lib64/python2.5',
 '/tmp/env/lib64/python2.5/plat-linux2',
 '/tmp/env/lib64/python2.5/lib-tk',
 '/tmp/env/lib64/python2.5/lib-dynload',
 '/usr/lib/python2.5',
 '/usr/lib64/python2.5',
 '/usr/lib64/python2.5/lib-tk',
 '/tmp/env/lib/python2.5/site-packages',
 '/usr/lib/python2.5/site-packages']

Expected results:
See how /usr/lib64/python2.5/site-packages (and thus all paths below, like Numeric, PIL, etc.) are missing in the second output.

Additional info:
A similar problem (on OpenSuSE) was described here https://bugs.launchpad.net/virtualenv/+bug/248558/comments/2 (note that that is different from the original bug report) and propagated to OpenSuSE's bugtracker here: https://bugzilla.novell.com/show_bug.cgi?id=430761. That might be related if Fedora is also patching site.py.