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.
-
You run code by VS Code or command line ? – leminhnguyen May 16 '20 at 13:57
-
Are both VS code and Python both use the same processor configuration? So are they both 32 OR 64-bit? – estherwn May 17 '20 at 13:35
-
Could you add a screenshot of your setup and the error message? – estherwn May 17 '20 at 13:36
-
Did you check the [windows environment path variables](https://stackoverflow.com/questions/49616399/windows-anaconda-python-is-not-recognized-as-an-internal-or-external-command)? – Benjamin Ziepert Jun 09 '20 at 08:40
4 Answers
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

- 156
- 6
-
I have tried this and it still is not working. I did install my python on the root of C. – Les McCarver May 16 '20 at 15:10
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.

- 4,660
- 5
- 27
- 40

- 1
- 1
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

- 322
- 1
- 14
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.

- 52
- 8