I've been trying to setup my Python workspace on Visual Studio Code but the software doesn't seem to pick up the fact that I have Python installed, and keeps telling me to install Python. I've tried manually adding the path of the .exe file but the "invalid interpreter prompt" shows up every single time. Just to proof I'm having the correct path in the settings here's a screenshot of the settings.json file:
and the command prompts I used to obtain the path:
NB: I tried reinstalling both VSCode and Python through the instructions from the command palette, and ran VSCode as administrator but nothing made a difference. I added the python.exe
file location to PATH
as well.
On my device (VSCode 1.71.2, Python extension 2022.14.0) I could solve the problem by clearing the python interpreter setting.
For this, use Ctrl+Shift+P to open the command palette. Then, enter Python: Clear Workspace Interpreter Setting
. On the next panel, select to delete all.
After this, you should be able to select an interpreter by entering Python:Select Interpreter
in the command palette.
First, make sure you have the python extension installed.
Then follow the steps below to choose an interpreter for vscode:
Use Ctrl+Shift+P to open the command palette
search for Python:Select Interpreter
(or click select interpreter in the lower right corner)
If the panel shows an interpreter, select the available interpreter. If the panel doesn't have an interpreter option. Please select the first item Enter interpreter path
Then paste the full path to your python.exe
(or go to explorer by selecting Find
and select your python.exe
)
If it still fails, try installing the pre-release python extension.
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