virtualenv macosX --no-site-package ignored

Posted by Tristram Gräbener on Stack Overflow See other posts from Stack Overflow or by Tristram Gräbener
Published on 2010-06-07T15:46:30Z Indexed on 2010/06/07 15:52 UTC
Read the original article Hit count: 347

Filed under:
|
|

Hello, I'm having problems with macOSX and virtualenv. It seems to ignore --no-site-package. Using exactly the same commands with linux (archlinux) it works. It it macOSX 10.5 with python 2.5

curl -o virtualenv.py 'http://bitbucket.org/ianb/virtualenv/raw/tip/virtualenv.py

Create a new environment

python virtualenv.py --no-site-packages foo
New python executable in foo/bin/python
Installing setuptools...........................done.

Activate it

source foo/bin/activate

Try to install something in it. Despite virtualenv it looks for the system-wide install

easy_install cherrypy
Searching for cherrypy
Best match: CherryPy 3.1.2
Adding CherryPy 3.1.2 to easy-install.pth file

Using /Library/Python/2.5/site-packages
Processing dependencies for cherrypy
Finished processing dependencies for cherrypy

Yet it doesn't find the module

(foo)guidage-multimodal:~ tristram$ python
Python 2.5.1 (r251:54863, Feb  6 2009, 19:02:12) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cherrypy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named cherrypy

I tried PIP after looking at http://stackoverflow.com/questions/1382925/virtualenv-no-site-packages-and-pip-still-finding-global-packages However it fails installing psycopg2 (some problems with gcc). Also I would like to be able to have a setup.py (from distribute) that does the whole woork

© Stack Overflow or respective owner

Related posts about python

Related posts about macosx