i use python 3.10 how should i create a python 3.8 virtual environment in vscode?
Question:
I’m using python 3.10 in vs code and i have to create a project using python 3.8 so how could i create a virtual environment with python 3.8?
i tried in the vs code command prompt python -m venv venv, it is creating the environment but i cannot find the required version of python.
Answers:
You need to install python 3.8 to create environments of it.
For example, use pyenv
to easily manage this, and Vscode knows how to detect a pyenv setup (e.g. .python-version
file in the project).
I’m using python 3.10 in vs code and i have to create a project using python 3.8 so how could i create a virtual environment with python 3.8?
i tried in the vs code command prompt python -m venv venv, it is creating the environment but i cannot find the required version of python.
You need to install python 3.8 to create environments of it.
For example, use pyenv
to easily manage this, and Vscode knows how to detect a pyenv setup (e.g. .python-version
file in the project).