i use python 3.10 how should i create a python 3.8 virtual environment in vscode?


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.

>Solution :

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).

Leave a Reply Cancel reply