-1

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.

saloua
  • 2,433
  • 4
  • 27
  • 37

2 Answers2

0

Virtual environments are used for that. I use miniconda to manage my python versions.

After installing it, you can simply create an environment with python 3.8 like this:

conda create -n python38 python=3.8

Afterwards you can activate the create environment like this

conda activate python38

And install a wide variety of packages like so:

conda install matplotlib pandas numpy
nhaus
  • 786
  • 3
  • 13
0

For that, you can use virtual environments for example using Conda.

  1. Create a virtual environment for python 3.8. In the project folder run the following command
    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
  1. Activate the created environment
    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.

saloua
  • 2,433
  • 4
  • 27
  • 37