On my MacBook Pro, I have Python 3.6 as default but the project I take over from another requires 2.7, which I have it installed via Anaconda. I set up the Pipenv using pipenv install
which setup a version to 3.6. Then I tried to change the version by :
pipenv --python 2.7
but it returned this warning:
Warning: Your Pipfile requires python_version 3.6, but you are using 2.7.15 (/Users/j/.local/share/v/Z/bin/python).
Then of course pipenv check
failed, and returned:
Specifier python_version does not match 3.6 (2.7).
Then I tried pipenv install python 2.7.15
and also failed. The Pipfile remains as 3.6 unchanged.
Error: An error occurred while installing 2.7.15!
Could not find a version that satisfies the requirement 2.7.15 (from versions: )
No matching distribution found for 2.7.15
Here is the python versions ls -ls /usr/bin/python*
32 -rwxr-xr-x 1 root wheel 66880 24 Oct 12:47 /usr/bin/python
0 -rwxr-xr-x 4 root wheel 925 18 Aug 02:45 /usr/bin/python-config
0 lrwxr-xr-x 1 root wheel 75 8 Oct 21:45 /usr/bin/python2.7 -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
0 lrwxr-xr-x 1 root wheel 82 8 Oct 21:45 /usr/bin/python2.7-config -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
32 -rwxr-xr-x 1 root wheel 66880 24 Oct 12:47 /usr/bin/pythonw
0 lrwxr-xr-x 1 root wheel 76 8 Oct 21:45 /usr/bin/pythonw2.7 -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7
Please advice how I can switch the python from 3.6 to 2.7 for this particular project using Pipenv?
All the best,
Jiajun