I have Python 3.10 (64-bit)
on my computer. And I use VS Code
. I need to install Python 3.8 (64-bit)
because I need to work with curses
and it only works with Python 3.8
.
For that, you can use virtual environments for example using Conda.
conda create --name "your-desired-environment-name" python="python-version"
e.g. to create a virtual environment for Python 3.8, run
conda create --name env_python3.8 python=3.8
conda activate env_python3.8
Then, in visual studio Code, you can easily switch from a virtual environment to another. That depends on the project that you are working on.
The following How-to guide from VS Code can also be helpful.