Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem with virtualenv in Mac OS X

I've installed virtualenv via pip and get this error after creating a new environment:

selenium:~ auser$ virtualenv new   New python executable in new/bin/python   ERROR: The executable new/bin/python is not functioning   ERROR: It thinks sys.prefix is u'/System/Library/Frameworks/Python.framework/    Versions/2.6' (should be '/Users/user/new')   ERROR: virtualenv is not compatible with this system or executable   

In my environment:

PYTHONPATH=/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages   PATH=/System/Library/Frameworks/Python.framework/Versions/2.6/bin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/Library/Frameworks/Python.framework/Versions/2.6/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin   

How can I repair this?

Thanks.

like image 357
gigimon Avatar asked May 05 '11 21:05

gigimon


People also ask

Where is virtualenv installed on Mac?

It will get installed in the venv/ folder, and not conflict with other projects.

Is virtualenv deprecated?

Deprecated since version 3.6: pyvenv was the recommended tool for creating virtual environments for Python 3.3 and 3.4, and is deprecated in Python 3.6. Changed in version 3.5: The use of venv is now recommended for creating virtual environments.


1 Answers

Just in case there's someone still seeking for the answer.

I ran into this same problem just today and realized since I already have Anaconda installed, I should not have used pip install virtualenv to install virtual environment as this would give me the error message when trying to initiate it later. Instead, I tried conda install virtualenv then entered virtualenv env_mysite and problem solved.

like image 118
wastetime909 Avatar answered Sep 19 '22 07:09

wastetime909