virtualenv --python=python3 fibonacci_env
Point out which python
سؤال
I'm on a mac, which comes with python 2.7 installed, so I should have the required version.
At least, I believe that's the problem. I'm getting an error when trying to run make install
for a project, and getting the following error:
The executable python2 (from --python=python2) does not exist
make: *** [bin/python] Error 3
المحلول
virtualenv --python=python3 fibonacci_env
Point out which python
نصائح أخرى
Specify the full path to the Python interpreter (not sure if this is the right path - haven't used MacOs):
mkvirtualenv myenv --python=/Library/Frameworks/Python.framework/Versions/2.7/bin/python
or smth like:
--python=$(which python)
Python 2.7 is part of system framework and is located here:
/System/Library/Frameworks/Python.framework/Versions/
If you want to create a virtualenv with python2.7 on macOS Sierra do this:
virtualenv -p /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python my_venv
Specify the python version you want to use
virtualenv -p /usr/bin/python3 venv