Virtual Environment

65 views Asked by At

How do I change the version of python in the virtual environment? I am trying to use Python 2.7.9 instead of the latest version. I'm on a mac and the virtual environment I'm using is venv.

1

There are 1 answers

0
Nikhil Nayak On

If you are using something like python's venv or virtualenv, you can't use a version of python that you don't have running on your computer. If you want multiple versions to be used at once, either install those versions, use something like Anaconda, or use something like pyenv. Pyenv is the same as downloading all the versions of python, expect you can easily manage them. Then, you can use venv on each of them to use multiple versions of python.