Repository navigation
command: 'python.setInterpreter' not found in VSCode 1.20 #781
Copy link
Copy link
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Activity
DonJayamanne commentedon Feb 14, 2018
Please could you try to uninstall and reinstall the extension.
Looks like some files are missing.
CtrlZvi commentedon Feb 14, 2018
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.
codeliger commentedon Feb 19, 2018
Uninstalling and reinstalling the plugin fixed the issue for me
sj4nes commentedon Mar 7, 2018
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.startREPLandpython.selectLintergive similar errors.Python 2.7 is located C:\Python27 and Python 3.6 in C:\Program Files\Python36
Windows version is 8.1
DonJayamanne commentedon Mar 7, 2018
Simon Janes (@sj4nes)
console window(Help-> Toggle Developer tools)sj4nes commentedon Mar 7, 2018
(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:
brettcannon commentedon Mar 7, 2018
Simon Janes (@sj4nes) that suggests your installation is somehow being corrupted as untildify is included in the extension.
DonJayamanne commentedon Mar 7, 2018
Simon Janes (@sj4nes) here's the solution:
sj4nes commentedon Mar 7, 2018
Yes, I have. Currently uninstalling vs studio and reinstalling vs studio as another test.
sj4nes commentedon Mar 7, 2018
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.
sschyu commentedon Apr 16, 2018
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.anviloro commentedon May 15, 2018
I had to delete the folder inside VSCode installation folder / extensions / python
then restart it and install it again.