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 set Python Interpreter - Error command 'python.setInterpreter' not found

See original GitHub issue

Environment data

VS Code version: Version 1.20.0-insider (1.20.0-insider), f4ed56b0d61050f6a94cfa033a058fabfdc0d651 Python Extension version: 0.9.1 Python Version: 2.7.10 OS and version: OSX 10.12.6

Actual behavior

Pressing Command + Shift + P, and then selecting the “Python: Select Interpreter” command

Error message appears at top:

Error command 'python.setInterpreter' not found
screen shot 2018-01-11 at 13 38 12

Expected behavior

The “Python: Select Interpreter” should allow you to pick a Python interpreter, rather than returning an error message.

Steps to reproduce:

  • Start up VS Code.
  • Press Command + Shift + P
  • Type in “python select”, then select the first result (“Python: Select Interpreter”)

Logs

Output from Python output panel

I’m not sure where this Python output panel is?

Output from Console window (Help->Developer Tools menu)

workbench.main.js:sourcemap:2618 [Extension Host] debugger listening on port 9334
workbench.main.js:sourcemap:2616 [Extension Host] debugger inspector at %cDebugger listening on port 9334.
Warning: This is an experimental feature and could change at any time.
To start debugging, open the following URL in Chrome:
    chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9334/518ad386-7993-4474-a42e-82c7566ba4da

workbench.main.js:sourcemap:253 [Extension Host] Activating extension `ms-python.python` failed: Cannot find module '/Users/victorhooi/.vscode-insiders/extensions/ms-python.python-0.9.1/out/client/extension'. (at Object.showMessage (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:508:200))
t.log @ workbench.main.js:sourcemap:253
workbench.main.js:sourcemap:253 [Extension Host] Activating extension `ms-python.python` failed:  Cannot find module '/Users/victorhooi/.vscode-insiders/extensions/ms-python.python-0.9.1/out/client/extension' (at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:293:87)
t.log @ workbench.main.js:sourcemap:253
workbench.main.js:sourcemap:253 [Extension Host] Here is the error stack:  Error: Cannot find module '/Users/victorhooi/.vscode-insiders/extensions/ms-python.python-0.9.1/out/client/extension'
	at Function.Module._resolveFilename (module.js:470:15)
	at Function.Module._load (module.js:418:25)
	at Function.J.Y.t.getExtensionPathIndex.then.o._load (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:490:787)
	at Module.require (module.js:498:17)
	at require (internal/module.js:20:19)
	at Function.a [as __$__nodeRequire] (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js:31:863)
	at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:511:186
	at t._doActivateExtension (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:511:298)
	at t._activateExtension (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:510:233)
	at Object.actualActivateExtension (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:508:332) (at /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:293:155)
workbench.main.js:sourcemap:4118 Activating extension `ms-python.python` failed: Cannot find module '/Users/victorhooi/.vscode-insiders/extensions/ms-python.python-0.9.1/out/client/extension'.
t._logMessageInConsole @ workbench.main.js:sourcemap:4118
workbench.main.js:sourcemap:2821 command 'python.setInterpreter' not found
e.doShow @ workbench.main.js:sourcemap:2821
workbench.main.js:sourcemap:1248  INFO Requested uninstalling the extension ms-python.python from window 3
workbench.main.js:sourcemap:1248  INFO Uninstalling the extension ms-python.python-0.9.1 from window 3
workbench.main.js:sourcemap:1248  INFO showMessageBox begin:  Object {message: "Are you sure you want to uninstall 'Python'?", buttons: Array(2), type: "question", cancelId: 1, noLink: true…}
workbench.main.js:sourcemap:1248  INFO showMessageBox closed, response:  Object {button: 0, checkboxChecked: false}
workbench.main.js:sourcemap:2821 command 'python.setInterpreter' not found
e.doShow @ workbench.main.js:sourcemap:2821
e.show @ workbench.main.js:sourcemap:2820
e.resume @ workbench.main.js:sourcemap:2820
(anonymous) @ workbench.main.js:sourcemap:4505
e.fire @ workbench.main.js:sourcemap:160
(anonymous) @ workbench.main.js:sourcemap:3292

I have tried uninstalling and reinstalling both VSCode Insiders, as well as the Python extension.

I saw this similar issue - https://github.com/DonJayamanne/pythonVSCode/issues/1394 - but reinstalling didn’t fix it in this instance, and no explanation was given on that issue of the underlying issue.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
hargikascommented, Mar 9, 2018

I am on windows machine, I upgraded to the latest version and this problem started to appear.

I uninstalled all other extensions except python and when I am pressing Ctrl + Shift + P, and then selecting the “Python: Select Interpreter” command

I get: Error command ‘python.setInterpreter’ not found

0reactions
brettcannoncommented, Mar 12, 2018

If people have issues with the automatic updating then please completely uninstall the Python extension, close VS Code, open it again, and then try installing the extension. If that doesn’t work then please open a new issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python select interpreter not found VS Code - Stack Overflow
Just click on the restricted window on the bottom and just select "Trust" in the pop up window. [https://code.visualstudio.com/docs/editor/ ...
Read more >
what is "command 'python.setInterpreter' not found" error(i ...
I hav the same problem, tried to install/reinstall vscode and deleted .vscode folder but nothing works. UPDATE: Just found a temp solution: ...
Read more >
How to change Python Version (Interpreter) in VSCode ...
This tutorial will show you the fastest way to change your Python environment in Visual Studio code.00:00 VSCode how to change Python ......
Read more >
Settings Reference for Python - Visual Studio Code
Python settings reference. The Python Extension for Visual Studio Code is highly configurable. This page describes the key settings you can work with....
Read more >
Configure a Python interpreter | PyCharm Documentation
Python interpreters in PyCharm. To work with your Python code in PyCharm, you need to configure at least one Python interpreter.
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