Skip to content

Command 'Python: Select Interpreter' resulted in an error (command 'python.setInterpreter' not found) #12072

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
asadullahkhan opened this issue May 30, 2020 · 28 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug investigating We are looking into the cause of the issue

Comments

@asadullahkhan
Copy link

Issue Type: Bug

Command 'Python: Select Interpreter' resulted in an error (command 'python.setInterpreter' not found)

Extension version: 2020.5.80290
VS Code version: Code 1.45.1 (5763d909d5f12fe19f215cbfdd29a91c0fa9208a, 2020-05-14T08:27:35.169Z)
OS version: Windows_NT x64 6.1.7601

System Info
Item Value
CPUs Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz (4 x 2594)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: unavailable_off
protected_video_decode: unavailable_off
rasterization: unavailable_off
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: unavailable_off
Load (avg) undefined
Memory (System) 3.87GB (0.83GB free)
Process Argv
Screen Reader no
VM 0%
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label May 30, 2020
@brettcannon
Copy link
Member

Was the extension activated when you ran the command?

@karthiknadig karthiknadig self-assigned this Jun 2, 2020
@karthiknadig karthiknadig added triage bug Issue identified by VS Code Team member as probable bug labels Jun 2, 2020
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Jun 2, 2020
@asadullahkhan
Copy link
Author

asadullahkhan commented Jun 6, 2020 via email

@karthiknadig
Copy link
Member

@asadullahkhan Try with the latest version of the extension. If you continue to see this issue, try uninstalling the extension, reload VSCode. Then go to %USERPROFILE%\.vscode\extension directory and delete all instances of ms-python.python-*. Then re-install the extension. This should resolve the issue.

@karthiknadig karthiknadig added the info-needed Issue requires more information from poster label Jun 19, 2020
@rholland
Copy link

rholland commented Jul 2, 2020

same problem

@karthiknadig
Copy link
Member

@rholland have you tried the steps in my previous comment? I so can you share the output of dir/ls in ~/.vscode/extensions folder.

@JReeGene
Copy link

I'm experiencing similar issue: Command 'Python: Select Interpreter' resulted in an error (command 'python.setInterpreter' not found)

@karthiknadig karthiknadig added investigating We are looking into the cause of the issue and removed triage labels Sep 15, 2020
@DavidKutu DavidKutu removed the info-needed Issue requires more information from poster label Sep 24, 2020
@junioor21
Copy link

i get the same issue (Command 'Python: Select Interpreter' resulted in an error (command 'python.setInterpreter' not found)) even after doing all of @karthiknadig steps

@molotch
Copy link

molotch commented Nov 23, 2020

Same issue with an offline install of VS Code and the python extension from a VSIX.

Version: 1.51.1 (user setup)
Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f
Date: 2020-11-10T23:34:32.027Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.17763

ms-python v2020.11.358366026

Any ideas on how to troubleshoot?

@asadullahkhan
Copy link
Author

asadullahkhan commented Nov 23, 2020 via email

@asadullahkhan
Copy link
Author

asadullahkhan commented Nov 23, 2020 via email

@molotch
Copy link

molotch commented Nov 23, 2020

Hi, Just go to the vscode python library and remove all the python library version & re-install it.

On Mon, 23 Nov 2020 at 5:28 PM, Molotch @.***> wrote: Same issue with an offline install of VS Code and the python extension from a VSIX. Version: 1.51.1 (user setup) Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f Date: 2020-11-10T23:34:32.027Z Electron: 9.3.3 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Windows_NT x64 10.0.17763 ms-python v2020.11.358366026 Any ideas on how to troubleshoot? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#12072 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABU7C46NA2LJOYY5LT6MOBDSRJE6LANCNFSM4NOSRXHA .

What do you mean by the "vscode python library"? I tried uninstalling all extensions and made sure the ~/.vscode/extensions folder was empty before reinstalling. I also tried a different version of the extension (ms-python.python-2020.11.367453362.vsix) and another version of VS Code (1.49.0). No luck.

On my regular laptop that's connected to the internet I've had no problems. This is a locked down environment with no internet access, also it's running Windows Serer 2019 if that's a problem. This is the first time I'm running it there.

@Gerard2012
Copy link

I have same issue. Also, Python extension doesn't even seem to try to load when I'm working on a Python file.
Extension is installed and enabled but not listed in "Running Extensions". Had to install via VSIX as laptop behind proxy.

@asadullahkhan
Copy link
Author

asadullahkhan commented Nov 25, 2020 via email

@rogerbrinkmann
Copy link

rogerbrinkmann commented Nov 25, 2020

I have same issue as @molotch.
Did the same steps to clear up the problem but had no success.
Also, I'm using only one version of Python: 3.6

On another machine with internet access the problem does not exist

I'm using VSCode in a locked offline environment without internet access.
Since installing ms-python.python-2020.11.367453362.vsix, I get the same message stating that extension might not have installed correctly.
Reverting back to ms-python.python-2020.10.xxxx.vsix, works. So seems to be clear that the issue is related the new version

@molotch
Copy link

molotch commented Dec 1, 2020

Reverting back to ms-python.python-2020.10.xxxx.vsix, works. So seems to be clear that the issue is related the new version

Thanks, this worked for me also. There's definitely something going on with the 2020.11.xxxxx versions.

@rismarksvej
Copy link

Same issue with an offline install of VS Code and the python extension from a VSIX.

Version: 1.51.1 (user setup)
Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f
Date: 2020-11-10T23:34:32.027Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.17763

ms-python v2020.11.358366026

Any ideas on how to troubleshoot?

It has been the same issue that bothers me so much.

@mikkosuonio
Copy link

According to the manifest ms-python seems to depend on ms-toolsai.jupyter. Have you tried installing also that?

https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter

@karthiknadig
Copy link
Member

If you are installing from VSIX manually (and offline) you will also need to install ms-toolsai.jupyter extension.

@GlenQu
Copy link

GlenQu commented Jan 8, 2021

Thanks @karthiknadig. I was having issues with installing the Python extension offline and installing the ms-toolsai.jupyter first now allows the Python extension to work correctly.

@virtuald
Copy link

I also have this problem with an offline install. I'll try the jupyter extension, but it would be good if the extension reported some kind of error when it wasn't installed instead of failing silently.

@halfow
Copy link

halfow commented Mar 22, 2021

Windows 10
VS-code 1.54.3
Python release 2021.3.658691958

Installed it today in an offline environment, (install from .vsix) with the problems described above. Mainly noted that IntelliSense was not working at first.

Ran again with the insider build 1.55.0 to make sure and had the same bad luck.

Tried the insider build again but also installing the Jupyter 2021.4.641214696 extension as suggested by @mikkosuonio and clarified by @karthiknadig.

This seems to have worked for me.
Although this is not a solution for the regular version of visual studio code as the Jupyter plugin only installs on insider builds.

Note: Made fresh installs of both editions and also removed extensions as described by @karthiknadig to be on the safe side

@jayhowell
Copy link

I had the exact same issues above, "Command 'Python: Select Interpreter' resulted in an error (command 'python.setInterpreter' not found)"

RHEL 7.9
vs-code: 1.52.1(Downgraded from 1.54.3 due to incompatible changes in library dependencies)
python: 3.6.8

Initially, when I tried to run my python files, I would get an error that jupyter notebook could not be loaded. When I finally went to set the interpreter using Shift-ctl-P , I got "Command 'Python: Select Interpreter' resulted in an error (command 'python.setInterpreter' not found)"

Solved it by deleting .vscode in my home directory. I'm guessing this would be %USERPROFILE%.vscode in windows. Relaunching vscode recreated the .vscode directory and then it prompted me to download all the extensions I needed. Not sure if it helps, but I think this may fix most of the problems above.

@hbirkdale
Copy link

Same issue - running on a Mac and have had no issues - then suddenly the python extensions stopped working. I've deleted the extensions directory, install and uninstalled all extensions - nothing works.

@kk17
Copy link

kk17 commented Jul 1, 2021

same issue. Cannot use jupyter notebook

@PenguinJunk
Copy link

Does this help? microsoft/vscode#131040

@PenguinJunk
Copy link

With Python: Select Interpreter throwing an error , based on @jayhowell 's response I deleted .vscode/ms-python-vscode-#####/ folder and all was fixed when I reloaded vscode. I've not dug any deeper.

@constanzafierro
Copy link

I'm experiencing the same issue, none of the python commands work on ssh (locally they work).

vscode: Version: 1.60.2 Commit: 7f6ab5485bbc008386c4386d08766667e155244e
Remote - SSH version: v0.65.8
OS version: Mac OS BigSur 11.6

@karthiknadig
Copy link
Member

In the latest release, we made several changes to how the extension loads and activates. Please file separate issue if you run into this. We have addressed a bunch of issues with extension loading that should indirectly address this as well. So, I will be closing this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug investigating We are looking into the cause of the issue
Projects
None yet
Development

No branches or pull requests