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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With