virtualenv not working under opensuse
Bug #248558 reported by
Malte Marquarding
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Virtualenv |
In Progress
|
Undecided
|
Unassigned | ||
python-virtualenv (Fedora) |
Invalid
|
Medium
|
Bug Description
opensuse 10.1 or greater, sets up a system 'distutils.cfg' with default install location being '/usr/local'.
The attached patch fixes this.
Changed in python-virtualenv: | |
status: | Unknown → In Progress |
Changed in virtualenv: | |
status: | Fix Committed → In Progress |
Changed in python-virtualenv: | |
status: | In Progress → Fix Committed |
Changed in python-virtualenv: | |
status: | Fix Committed → Fix Released |
Changed in python-virtualenv (Fedora): | |
importance: | Unknown → Medium |
status: | Fix Released → Invalid |
To post a comment you must log in.
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 pprint( sys.path) bond1/spascoe/ expt/myenv2/ lib/python2. 5/site- packages/ setuptools- 0.6c8-py2. 5.egg', bond1/spascoe/ expt', bond1/spascoe/ expt/myenv2/ lib/python25. zip', bond1/spascoe/ expt/myenv2/ lib64/python2. 5', bond1/spascoe/ expt/myenv2/ lib64/python2. 5/plat- linux2' , bond1/spascoe/ expt/myenv2/ lib64/python2. 5/lib-tk' , bond1/spascoe/ expt/myenv2/ lib64/python2. 5/lib-dynload' , lib/python2. 5', lib64/python2. 5', lib64/python2. 5/lib-tk' , bond1/spascoe/ expt/myenv2/ lib/python2. 5/site- packages' ] spascoe@ bond:~/ host/bond/ expt> /usr/bin/python pprint( sys.path)
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.
['',
'/disks/
'/disks/
'/disks/
'/disks/
'/disks/
'/disks/
'/disks/
'/usr/
'/usr/
'/usr/
'/disks/
>>>
(myenv2)
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.
['',
... eggs-snipped...
'/usr/ local/lib64/ python2. 5/site- packages/ setuptools- 0.6c9-py2. 5.egg', bond1/spascoe/ expt', lib/python25. zip', lib64/python2. 5', lib64/python2. 5/plat- linux2' , lib64/python2. 5/lib-tk' , lib64/python2. 5/lib-dynload' , lib64/python2. 5/site- packages' , lib64/python2. 5/site- packages/ Numeric' , lib64/python2. 5/site- packages/ gtk-2.0' , local/lib64/ python2. 5/site- packages' ]
'/disks/
'/usr/
'/usr/
'/usr/
'/usr/
'/usr/
'/usr/
'/usr/
'/usr/
'/usr/
>>>