Skip to content

command: 'python.setInterpreter' not found in VSCode 1.20 #781

Closed

Description

@CtrlZvi

Environment data

VS Code version: 1.20
Python Extension version: 2018.1.0
Python Version: 3.6.4
OS and version: Windows 10 Build 16299

Actual behavior

An error notification saying command: 'python.setInterpreter' not found appears

Expected behavior

Trying to set the python interpreter pulls up a list of interpreter choices.

Steps to reproduce:

  • Install VSCode 1.20
  • Install Python 3.6.4
  • Open a python project with VSCode
  • Press Ctrl+Shift+P to pull up the commands and select Python: Select Interpreter

Logs

Output from Python output panel
I discovered this trying to reselect an interpreter to force the plugin to load. There is no Python output panel because the plugin has not successfully loaded.
Output from Console window (Help->Developer Tools menu)

/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:4183 Activating extension `ms-python.python` failed: Cannot find module './banner'.
R._logMessageInConsole @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:4183
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] Activating extension `ms-python.python` failed:  Cannot find module './banner'
t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:253
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] Here is the error stack:  Error: Cannot find module './banner'
	at Function.Module._resolveFilename (module.js:470:15)
	at Function.Module._load (module.js:418:25)
	at Function.o._load (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:664:413)
	at Module.require (module.js:498:17)
	at require (internal/module.js:20:19)
	at Object.<anonymous> (C:\Users\viz_s\.vscode\extensions\ms-python.python-2018.1.0\out\client\extension.js:21:18)
	at Object.<anonymous> (C:\Users\viz_s\.vscode\extensions\ms-python.python-2018.1.0\out\client\extension.js:215:3)
	at Module._compile (module.js:571:32)
	at Object.Module._extensions..js (module.js:580:10)
	at Module.load (module.js:488:32)
/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2925 command 'python.setInterpreter' not found

Activity

  1. DonJayamanne commented on Feb 14, 2018

    @DonJayamanne

    Please could you try to uninstall and reinstall the extension.
    Looks like some files are missing.

  2. CtrlZvi commented on Feb 14, 2018

    @CtrlZvi
    Author

    I'd already tried that, but I just tried again. Not sure if it's the second time that fixed things, or if it's the fact that before I just reloaded the window, and this time I fully closed VSCode (I had another window open both times that wasn't using Python code). But it's working now.

  3. codeliger commented on Feb 19, 2018

    @codeliger

    Uninstalling and reinstalling the plugin fixed the issue for me

  4. sj4nes commented on Mar 7, 2018

    @sj4nes

    This problem happens on my system with the 2018.1 (01 Feb 2018) version:

    Version 1.20.1
    Commit f88bbf9137d24d36d968ea6b2911786bfe103002
    Date 2018-02-13T15:34:36.336Z
    Shell 1.7.9
    Renderer 58.0.3029.110
    Node 7.9.0
    Architecture x64

    The https://github.com/Microsoft/vscode-python extension is the only one enabled in my workspace for testing this. python.startREPL and python.selectLinter give similar errors.

    Python 2.7 is located C:\Python27 and Python 3.6 in C:\Program Files\Python36

    Windows version is 8.1

  5. DonJayamanne commented on Mar 7, 2018

    @DonJayamanne

    Simon Janes (@sj4nes)

    • Have you tried uninstalling and reinstalling the extension?
    • Please disable all extensions globally and test
    • Have you confirmed there are no errors in your console window (Help-> Toggle Developer tools)
  6. sj4nes commented on Mar 7, 2018

    @sj4nes

    (edit) All other extensions globally disabled, and tried uninstall/reinstall.

    Aha, forgive me, I am not familiar with debugging VSCode extensions. There are some errors in the Developer console:

    /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] Activating extension `ms-python.python` failed:  Cannot find module 'untildify'
    t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:253
    /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] Here is the error stack:  Error: Cannot find module 'untildify'
    	at Function.Module._resolveFilename (module.js:470:15)
    	at Function.Module._load (module.js:418:25)
    	at Function.o._load (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:664:413)
    	at Module.require (module.js:498:17)
    	at require (internal/module.js:20:19)
    	at Object.<anonymous> (C:\Users\simon_000\.vscode\extensions\ms-python.python-2018.1.0\out\client\common\configSettings.js:10:19)
    	at Object.<anonymous> (C:\Users\simon_000\.vscode\extensions\ms-python.python-2018.1.0\out\client\common\configSettings.js:331:3)
    	at Module._compile (module.js:571:32)
    	at Object.Module._extensions..js (module.js:580:10)
    	at Module.load (module.js:488:32)
    /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:4183 Activating extension `ms-python.python` failed: Cannot find module 'untildify'.
    
  7. brettcannon commented on Mar 7, 2018

    @brettcannon
    Member

    Simon Janes (@sj4nes) that suggests your installation is somehow being corrupted as untildify is included in the extension.

  8. DonJayamanne commented on Mar 7, 2018

    @DonJayamanne

    Simon Janes (@sj4nes) here's the solution:

    Have you tried uninstalling and reinstalling the extension?

  9. sj4nes commented on Mar 7, 2018

    @sj4nes

    Yes, I have. Currently uninstalling vs studio and reinstalling vs studio as another test.

  10. sj4nes commented on Mar 7, 2018

    @sj4nes

    Okay, it wasn't enough to uninstall/reinstall VSCode nor disabling all extensions except for the Python code nor uninstalling/reinstalling the Python extension. I had to rename/delete the .vscode directory for a fresh "extensions" state.

    Hope this helps others in the future.

  11. sschyu commented on Apr 16, 2018

    @sschyu

    Simon Janes (@sj4nes) This saved me.
    I had VSCode Sync extension and pulled my settings and extension from a gist.
    Cleaning the .vscode/ solved the problem.

  12. anviloro commented on May 15, 2018

    @anviloro

    I had to delete the folder inside VSCode installation folder / extensions / python
    then restart it and install it again.

  13. locked as resolved and limited conversation to collaborators on Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions