0

I'm just installed Visual Studio Code yesterday and am getting the error that Python is not installed. I currently have Python 3.8 installed. I have tried installed Python 3.7 and Python 3.5 and still am getting the same error that python is not installed and am unable to select a python interpreter even when I point it to directory of my python install.

Les McCarver
  • 11
  • 1
  • 1

4 Answers4

0

I am assuming you have the "Visual Studio Code and the Python Extension" installed. (https://code.visualstudio.com/docs/python/python-tutorial)

You could try replacing the path slashes with double back-slashes. See: https://github.com/microsoft/vscode-python/issues/3460#issuecomment-452708017

For example: C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python37-32\\python.exe

estherwn
  • 156
  • 6
0

I resolved this issue by uninstalling Python, then reinstalling to a simpler path.

My previous installation was located at: C:\Users\username\AppData\Local\Programs\Python\Python38\python.exe so I reinstalled Python to C:\python and VS Code now recognizes the interpreter.

It also warned me that I was using an outdated version of PIP (even though I installed the latest Python version - 3.8.5), but it was easily upgraded by typing the installation command provided in the error message.

Olivia Stork
  • 4,660
  • 5
  • 27
  • 40
0

I got mine solved by removing the .vscode folder and the vscode config file. Now everything seems to be working fine

If you are on Linux then run these commands:

rm ~/.config/Code/User/settings.json
rm -rf ~/.config/Code
rm -rf ~/.vscode

Then if you want you can reinstall vscode, mine worked without a need to reinstall

GN Vageesh
  • 322
  • 1
  • 14
-2

It's simple just go to the extension tab and type "Python". Install the First one (By Microsoft) and restart vs code and your good to go.

S.I.Ayonto
  • 52
  • 8