[Zope3-Users] Re: virtualenv problems

Philipp von Weitershausen philipp at weitershausen.de
Sun Nov 18 04:12:21 EST 2007


George Wright wrote:
> Gidday
> I have been trying to set up a virtualenv as has been suggested several 
> times on this list.
> Following steps in section 1.4 of "Zope Component Architecture.pdf"
> I have a path problem:
> 
> $ easy_install virtualenv
> ...
> virtualenv 0.8.4 is already the active version in easy-install.pth
> Installing virtualenv script to 
> /Library/Frameworks/Python.framework/Versions/2.4/bin
> Using 
> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/virtualenv-0.8.4-py2.4.egg
> ...
> Finished processing dependencies for virtualenv
> 
> $ virtualenv myvirtualenv
> New python executable in myvirtualenv/bin/Python
> ERROR: The executable myvirtualenv/bin/Python is not functioning
> ERROR: It thinks sys.prefix is 
> '/Library/Frameworks/Python.framework/Versions/2.4' (should be 
> '/Users/georgewright/myvirtualenv')
> ERROR: virtualenv is not compatible with this system or executable
> $
> 
> How do I fix that sys.prefix problem?

You update to a newer virtualenv version that has a fix for this 
problem. easy_install -U virtualenv. Or you install a proper Python 
executable that isn't messed up as a framework build (see below).

> Following threads on virtualenv I gather I should be using a "non-system 
> python installation". How do I do that?

By compiling it yourself. Download the Python-2.4.4.tgz tarball and do 
the configure --prefix=...; make; make install dance.

I highly recommend that everybody, no matter what platform s/he's on, 
does this. Default Python setups ("system pythons") are just too messed 
up and often tainted by the global installation of eggs.



More information about the Zope3-users mailing list