Home > OS >  Downloading >=Python 3.10 for VS Code
Downloading >=Python 3.10 for VS Code

Time:01-06

I am a complete beginner at Python and am going through the CS50P tutorial. The tutorial just went through match commands, and as I tried to run a program including match on VS Code an error message appeared telling me that I do not have a version of Python that supports match. How can I get Python 3.10 on VS?

I have tried going through the VS Code gui but haven't had any luck. Because of my extreme inexperience I am just assuming that I am looking in the wrong places.

CodePudding user response:

Follow this steps(hope will help you):

  1. Download python from the official website python website and chose the version you want
  2. Make sure you add python to the virtual environment by clicking (add python to environment variable) like this image setup python.
  3. After that go to VSCode and install the python extension.
  4. Open the python file now we can see the python version button next to the python button in VSCode lower bar just click it and a will popup window to choose Interpreter now click (Enter interpreter path) then (Find).
  5. Now go to the path where python is installed and chose (python.exe) to find the python path just type (where python) in cmd if you're using Windows.

CodePudding user response:

You should look into Conda. It makes working with different versions of python easy.

With conda installed this task would be as easy as:

  conda create -n py310 python=3.10

Then just tell VS to use py310 environment.

  • Related