1

I just installed Python 2.7.6.

$ python -V
Python 2.7.6

$ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python

When I try to specify the Python version while creating a new virtualenv with

virtualenv -p /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7.6 test

I get:

The executable /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7.6 (from --python=/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7.6) does not exist

If I simply use virtualenv test to create a new virtualenv I still get Python 2.7.5. What am I doing wrong?

1 Answer 1

2

Use the value returned by which:

virtualenv -p /Library/Frameworks/Python.framework/Versions/2.7/bin/python test

Python installations generally create executables and/or links to them with names like:

python
python2
python2.7

but not

python2.7.6

If you are concerned about confusion with the Apple-supplied system Python 2.7, don't be. Its path is at /usr/bin/python or /usr/bin/python2.7.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.