question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to select the python interpreter if Command prompt is not supported

See original GitHub issue

Environment data

  • VS Code version: 1.61.2
  • Extension version (available under the Extensions sidebar): v2021.10.1365161279
  • OS and version: Win10
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): venv

Expected behaviour

Select the python interpreter as usual.

Actual behaviour

Unable Select the python interpreter. In the Python channel in the OUTPUT panel, I can get these errors:

Error 2021-10-26 14:27:05: Refresh should have already been triggered when activating discovery component
> C:\Python38\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\anaconda3\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Programs\Python\Python39\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Programs\Python\Python37\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> d:\workPlace\pythontest3.9\.venv\Scripts\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\anaconda3\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\aaa\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\bbb\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> d:\workPlace\pythontest3.9\.venv\Scripts\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\ccc\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\env01\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\py39\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
Error 2021-10-26 14:27:06: Refresh should have already been triggered when activating discovery component
> C:\Python38\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\anaconda3\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Programs\Python\Python39\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\AppData\Local\Programs\Python\Python37\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> d:\workPlace\pythontest3.9\.venv\Scripts\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\anaconda3\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\aaa\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\bbb\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> d:\workPlace\pythontest3.9\.venv\Scripts\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\ccc\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\env01\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\py39\python.exe ~\.vscode\extensions\ms-python.python-2021.10.1365161279\pythonFiles\interpreterInfo.py

Screenshot (60)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
gonghenghaicommented, Oct 27, 2021

Thank you so much!!! you are perfect!!! genius!!! and god bless you!!! I feel like the sky is brightening up…

1reaction
gonghenghaicommented, Oct 26, 2021

And I can not use cmd now, maybe this has some relationship to this. Screenshot (64)

Read more comments on GitHub >

github_iconTop Results From Across the Web

command 'python.setInterpreter' not found #14959 - GitHub
Command 'Python: Select Interpreter' resulted in an error (command 'python.setInterpreter' not found) So I cannot run any python scripts ...
Read more >
Vs code not allowing me to choose Python 3.7.3 as interpreter
open the Command Palette (Ctrl+Shift+P) and enter Preferences: Open User Settings. Then set python.pythonPath, which is in the Python ...
Read more >
Python is not recognized as an internal or external command
One way to fix the error would be to launch Python from the Command Prompt by passing in the full path to the...
Read more >
Configure a Python interpreter | PyCharm Documentation
Press Ctrl+Alt+S to open the IDE settings and select Project <project name> | Python Interpreter. · Expand the list of the available interpreters ......
Read more >
Newbie Help: Terminal Can't Find Python
If you do not find said Python directory there, you can search for the executable: Press CMD + F in a Finder window...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found