Extension can't find python interpreter.
See original GitHub issueEnvironment data
- VS Code version: 1.27.2
- Extension version (available under the Extensions sidebar): 2018.8.0
- OS and version: windows 10 home 17134
- Python version (& distribution if applicable, e.g. Anaconda): 3.7.0 64 bit
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
- Relevant/affected Python packages and their versions: ?
Actual behavior
VS Code shows warning about not being able to find interpreter.
Selecting any Python: xxx command from command palette gives error of “command ‘python.xxx’ not found”.
Can not run file with “right click ‘Run Python File in Terminal’”.
Expected behavior
Extension finds interpreter and provides intellisense.
Python commands work.
File runs when “right click ‘Run Python File in Terminal’”.
Steps to reproduce:
- Install VS Code for Windows 10
- Install Python 3.7.0 for WIndows 10 (have it add python to path)
- Install python extension
- Try to run python command.
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
Starting Microsoft Python language server.
Downloading https://pvsc.blob.core.windows.net/python-language-server/Python-Language-Server-win-x64.beta.nupkg... complete.Unpacking archive... failed.
Bad archive
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
)
/C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:1411 INFO no standard startup: not the explorer viewlet
/C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Git installation not found.
t.log @ /C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:276
/C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Activating extension 'ms-python.python' failed: Bad archive.
t.log @ /C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:276
/C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Activating extension `ms-python.python` failed: Bad archive
t.log @ /C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:276
/C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:276 [Extension Host] Here is the error stack: Error: Bad archive
at LanguageServerDownloader.<anonymous> (C:\Users\matth\.vscode\extensions\ms-python.python-2018.8.0\out\client\activation\downloader.js:53:23)
at Generator.throw (<anonymous>)
at rejected (C:\Users\matth\.vscode\extensions\ms-python.python-2018.8.0\out\client\activation\downloader.js:7:65)
at <anonymous>
/C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:3260 Activating extension 'ms-python.python' failed: Bad archive.
w._logMessageInConsole @ /C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:3260
notificationsAlerts.ts:39 Error: command 'python.setInterpreter' not found
at t._tryExecuteCommand (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:3019:717)
at file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:3019:572
at Object.g [as _notify] (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:154:729)
at Object.enter (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:158:61)
at n.Class.derive._oncancel._run (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:159:902)
at n.Class.derive._oncancel._completed (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:159:343)
at l (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:162:855)
at n.Class.derive.join.r.forEach.j.then.o.(anonymous function) (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:163:45)
at Object.g [as _notify] (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:154:729)
at Object.enter (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:158:61)
at n.Class.derive._oncancel._run (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:159:902)
at n.Class.derive._oncancel._completed (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:159:343)
at l (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:162:855)
at n.Class.derive.join.r.forEach.j.then.o.(anonymous function) (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:163:45)
at Object.g [as _notify] (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:154:729)
at Object.enter (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:158:61)
at n.Class.derive._creator._run (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:159:902)
at n.Class.derive._creator._completed (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:159:343)
at Object.g [as _notify] (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:154:729)
at Object.enter (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:158:61)
at n.Class.derive._oncancel._run (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:159:902)
at n.Class.derive._oncancel._completed (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:159:343)
at e.resolveOk (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:3166:685)
at e._receiveReply (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:3234:965)
at e._receiveOneMessage (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:3233:519)
at file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:3232:74
at e.fire (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:175:76)
at a (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:311:740)
at Socket.n._socketDataListener (file:///C:/Users/matth/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:311:959)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at Pipe.onread (net.js:594:20)
t.onDidNotificationChange @ notificationsAlerts.ts:39
(anonymous) @ notificationsAlerts.ts:27
e.fire @ event.ts:140
t.notify @ notifications.ts:113
t.error @ notificationService.ts:52
t.onError @ commandsHandler.ts:325
(anonymous) @ commandsHandler.ts:310
done @ winjs.base.js:1399
v @ winjs.base.js:1245
enter @ winjs.base.js:916
_run @ winjs.base.js:1089
_chainedError @ winjs.base.js:1052
n @ winjs.base.js:751
then @ winjs.base.js:1457
enter @ winjs.base.js:762
_run @ winjs.base.js:1089
_setCompleteValue @ winjs.base.js:1073
g @ winjs.base.js:1191
enter @ winjs.base.js:867
_run @ winjs.base.js:1089
_completed @ winjs.base.js:1057
l @ winjs.base.js:1834
n.Class.derive.join.r.forEach.j.then.o.(anonymous function) @ winjs.base.js:1859
g @ winjs.base.js:1191
enter @ winjs.base.js:867
_run @ winjs.base.js:1089
_completed @ winjs.base.js:1057
l @ winjs.base.js:1834
n.Class.derive.join.r.forEach.j.then.o.(anonymous function) @ winjs.base.js:1859
g @ winjs.base.js:1191
enter @ winjs.base.js:867
_run @ winjs.base.js:1089
_completed @ winjs.base.js:1057
g @ winjs.base.js:1191
enter @ winjs.base.js:867
_run @ winjs.base.js:1089
_completed @ winjs.base.js:1057
e.resolveOk @ lazyPromise.ts:65
e._receiveReply @ rpcProtocol.ts:283
e._receiveOneMessage @ rpcProtocol.ts:202
(anonymous) @ rpcProtocol.ts:115
e.fire @ event.ts:140
a @ ipc.net.ts:106
n._socketDataListener @ ipc.net.ts:135
emitOne @ events.js:116
emit @ events.js:211
addChunk @ _stream_readable.js:263
readableAddChunk @ _stream_readable.js:250
Readable.push @ _stream_readable.js:208
onread @ net.js:594
Note:
I’ve uninstalled and reinstalled VS Code, Python, and the python extension.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
VS Code can't find Python - Stack Overflow
In VS Code, open the Settings with (Ctrl+,) then search settings for "Interpreter." There will an option for "Python: Default Interpreter ...
Read more >vscode can't find python interpreter - Reddit
vscode can't find python interpreter · Type python --version in Terminal to check if you've installed python correctly; · Open Command Palette( ...
Read more >Remote SSH Workspace cannot find Python Interpreter #16286
indefinitely in the lower right corner and I am unable to select an interpreter at all.
Read more >What to do if Visual Studio Code can't find your virtual ...
Tip! Clicking the current interpreter will bring up the Command Palette with Python: Select Interpreter command already selected! That's it! Visual Studio Code ......
Read more >Using Python environments in VS Code
To select a specific environment, use the Python: Select Interpreter command from the Command Palette (Ctrl+Shift+P).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m looking into it now. The language server download has been moved or removed from the download site. Apologies, we will rectify the situation as soon as we can!
If you need to get working straight away, if you set your config value
"python.jediEnabled": true
you will go back to the original provider that will work for you while we get this corrected.Again, our apologies.
Validated.