Issue
My Mac has python 3.10.5, and I have created a virtual environment which has python 3.8.5, now I want to create another virtual environment with python 3.7, I have searched online for a while, most ppl would suggest using pyenv
, but I am pretty sure my python 3.8.5 virtual environment is installed without pyenv
, I only used virtualenv
.
[email protected] ~ % python -V
Python 3.10.5
[email protected] ~ % cd environments
[email protected] environments % ls
bin coursera lib python3.8env pyvenv.cfg screenshots share
[email protected] environments % source python3.8env/bin/activate
(python3.8env) [email protected] environments % python -V
Python 3.8.5
(python3.8env) [email protected] environments % deactivate
[email protected] environments %
Solution
find out the path where your python version is installed
run below
virtualenv -p /your/python/path/python2.6 foldernamehere
Answered By - Sky Answer Checked By - Marilyn (WPSolving Volunteer)