Home > Net >  Running python in vscode
Running python in vscode

Time:05-02

Currently I have python 3.10 and I am trying to run a simple program in VS Code. I get the error message 'Program 'python3.10.exe' failed to run: The system cannot find the file specified'. I checked my environmental variables and they look correct along with my pip installation. It is asking for a path that is not present. I previously python and vscode then took it off and reinstalled. How do I change where VS Code looks for my python.exe?

CodePudding user response:

let's check these out(someone solved this before):

https://github.com/mscross/pysplit/issues/82

or

Error "The system cannot find the file specified" when running Python with Sublime

but making sure that you install python successfully, one way to check if python works, run this line py --version on your command line.

CodePudding user response:

You can select your python version in Visual Studio Code. I use 3 versions of python that 3.10, 3.9.8, 3.9.7.

Anyway bottom of your vscode, and you can see the python version. Click it on it will be show like this. And change that python version you reinstalled.

Additionally I'm recommend using virtual develop environments like anaconda or virtualenv stuff. When if you messed up or got a issue with module or python version errors ... remove or rebuild develop environment in your pc. I hope you solved with this problem.

  • Related