Reputation: 41
I have been using VSCode for a while and so far everything was good. Yesterday I created a new django project with it's own virtual environment. However, something happened to VSCode that it cannot find any interpreters. When I click shift+command+P and type >python: select interpreter, it gives me an error. I can still run my code and it works, which is weird but it is very uncomfortable to work like that because the colors are not highlighted in the code.
Upvotes: 2
Views: 5508
Reputation: 119
I created file .ipynb and open it with VS Code. I had the same error.
Then I created folder and put this file to folder. After that, I opened folder with VS Code and try command Python: Select interpreter
again. And it works. I was able to choose version of interpreter.
I hope this will be useful to you.
Upvotes: 0
Reputation: 1
I also faced the same issue and was able to solve it by doing the following:
I tried reverting to an older version of the python extension to see if that would fix the problem and it fixed the problem.
To install older version of python extension on VScode: Go to Extensions(Ctrl+Shift+X) then right click on the python extension, click on Install Another Version and choose an older version.
I hope this helps others who are facing the same issue!
Upvotes: 0
Reputation: 21
I ran into this problem with my newly installed VSCode on my Win10,and I fixed it by referring to other people's blog. The solution is somewhat complicated as follows:
First find the location where Microsoft VS Code is installed, then create a test folder in the same level directory, open this folder with VSCode, create a new VSCode window and open the folder where your python files are located, then select python interpreter.
Upvotes: 2