I recently updated from Python 2.7.6 to Python 2.7.9 on my Mac. My issue is that I cannot create a new virtualenv
using Python 2.7.9 with the -p
flag.
When I open the Python shell outside a virtual environment it is using 2.7.9:
localhost:test6 brendan$ python
Python 2.7.9 (v2.7.9:648dcafa7e5f, Dec 10 2014, 10:10:46)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
However, when I create a new virtual environment using either virtualenv
or mkvirtualenv
it continues to use 2.7.6.
I understand that I can use the -p
flag to create a virtual environment using a specific version of Python (e.g. 3.0, 2.6, etc.), but each of these have their own executable e.g.
virtualenv -p /usr/bin/python3.0 test6
or
virtualenv -p /usr/bin/python2.6 test7
I do not seem to have a python2.7.9
executable located in /usr/bin
or anywhere else. I do have a python2.7
executable, but if I specify this:
virtualenv -p /usr/bin/python2.7 test7
the resulting virtual environment still uses the 2.7.6 version of Python. I thought the installation of Python 2.7.9 should have updated the python2.7
executable in /usr/bin/
?
So my question is: where is my Python 2.7.9 executable located, and how do I specify it when creating a new virtual environment?