无法在VS代码中加载Python REPL

时间:2018-02-20 05:11:26

标签: python visual-studio-code

我使用的是Windows 10和Anaconda 5.1.0,Python 3.6 64位。

我使用默认的Anaconda安装程序安装了VS Code(在2/17/2018添加了功能)。然后,我尝试加载Python REPL(control + shift + P,然后是Python:Start REPL)。然而,什么都没发生;在下面的终端中,它只是Windows Powershell。

我还创建了以下python代码片段,它可以与F5或control + F5完美地运行。它应该表明我的Python设置是正确的。但是,我仍然无法使用Python REPL。

enter image description here

当我打开开发人员工具时,我看到了:

/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:253 [Extension Host] Python Extension: Failed to get conda environment list from conda null
t.log @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:253
console.ts:123 [Extension Host] rejected promise not handled within 1 second
t.log @ console.ts:123
t._logExtensionHostMessage @ extensionHost.ts:394
(anonymous) @ extensionHost.ts:211
emitTwo @ events.js:106
emit @ events.js:194
process.nextTick @ internal/child_process.js:766
_combinedTickCallback @ internal/process/next_tick.js:73
_tickCallback @ internal/process/next_tick.js:104
mainThreadExtensionService.ts:43 [ms-python.python]Cannot read property 'filter' of undefined
e.$onExtensionRuntimeError @ mainThreadExtensionService.ts:43
e._doInvokeHandler @ rpcProtocol.ts:174
e._invokeHandler @ rpcProtocol.ts:159
e._receiveRequest @ rpcProtocol.ts:108
e._receiveOneMessage @ rpcProtocol.ts:90
(anonymous) @ rpcProtocol.ts:33
(anonymous) @ rpcProtocol.ts:213
e.fire @ event.ts:142
(anonymous) @ ipc.net.ts:81
emitOne @ events.js:96
emit @ events.js:191
readableAddChunk @ _stream_readable.js:178
Readable.push @ _stream_readable.js:136
onread @ net.js:560
mainThreadExtensionService.ts:44 TypeError: Cannot read property 'filter' of undefined
    at CondaService.<anonymous> (C:\Users\Shawn\.vscode\extensions\ms-python.python-2018.1.0\out\client\interpreter\locators\services\condaService.js:130:44)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\Shawn\.vscode\extensions\ms-python.python-2018.1.0\out\client\interpreter\locators\services\condaService.js:13:58)
    at <anonymous>

0 个答案:

没有答案