Opened 10 years ago

Last modified 10 years ago

#45819 closed defect

virtualenv python is missing module search paths that are available when running bare python27. — at Initial Version

Reported by: justinjereza@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.2
Keywords: Cc:
Port: py27-virtualenv

Description

I used the following script to print a list of module search paths:

#!/usr/bin/env python

import sys

for i in sys.path:

if not i.startswith('/Users'):

print i

The result from the py27-virtualenv version of python is as follows:

/private/tmp /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages

The result from the python27 is as follows:

/private/tmp /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

As you can see, there are a lot of paths missing in the virtualenv version resulting in preventing the use of python modules installed via macports in conjunction with virtualenv.

Change History (0)

Note: See TracTickets for help on using tickets.