Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create virtualenv after upgrading OS X 10.6.8 Python to 2.7 #694

Closed
levtatz opened this issue Dec 26, 2014 · 5 comments
Closed

Cannot create virtualenv after upgrading OS X 10.6.8 Python to 2.7 #694

levtatz opened this issue Dec 26, 2014 · 5 comments

Comments

@levtatz
Copy link

levtatz commented Dec 26, 2014

I just updated my system Python like so: http://wolfpaulus.com/jounal/mac/installing_python_osx/

Does anyone have any insight into the following error:

$ mkvirtualenv --no-site-packages example_name
New python executable in example_name/bin/python
ERROR: The executable example_name/bin/python is not functioning
ERROR: It thinks sys.prefix is u'/System/Library/Frameworks/Python.framework/Versions/2.7' (should be u'/Users/lev/.virtualenvs/example_name')
ERROR: virtualenv is not compatible with this system or executable
$ which python
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python
$ which virtualenv
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenv
$ which virtualenvwrapper.sh
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh

In my PATH, I have

/System/Library/Frameworks/Python.framework/Versions/2.7/bin

Thank you for your time in advance.

@levtatz levtatz changed the title Cannot create virtualenv after upgrade system Python to 2.7 Cannot create virtualenv after upgrading system Python to 2.7 Dec 26, 2014
@levtatz levtatz changed the title Cannot create virtualenv after upgrading system Python to 2.7 Cannot create virtualenv after upgrading OS X 10.6.8 Python to 2.7 Dec 26, 2014
@dstufft dstufft mentioned this issue Jan 5, 2015
5 tasks
@levtatz
Copy link
Author

levtatz commented Feb 19, 2015

A possible workaround is described here: http://stackoverflow.com/a/5904670

For me:

/usr/bin/python2.6 /System/Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenv

seems to make it work

@levtatz levtatz closed this as completed Feb 19, 2015
@HSDen
Copy link

HSDen commented Feb 15, 2017

None of the above solutions work. I am also facing the same issue. Tried setting the PYTHONPATH variable as well.

@yan12125
Copy link

@Sane-Joker Are you using mkvirtualenv too? mkvirtualenv is part of virtualenvwrapper, and there were reports that virtualenvwrapper is broken on Mac. (#1006) Could you paste your commands and outputs?

@picarus
Copy link

picarus commented Aug 17, 2017

I would say that in many cases the issue will be that the user has Anaconda, then the solution is:
https://stackoverflow.com/questions/5904319/problem-with-virtualenv-in-mac-os-x
read answer by wastetime909 (not a waste of time at all!)

You have documented the Anaconda based installation but you don't have an entry in the first section (as you have for other OS). I suggest you add a link from the top so that people don't start a different installation procedure that will end up in trouble.

@everttrollip
Copy link

If you are still struggling, and experiencing this issue:

ERROR: virtualenv is not compatible with this system or executable

Have you tried installing virtualenv with conda and trying again?

conda install virtualenv

@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants