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.

Error when attempting to start a Jupyter kernel

See original GitHub issue

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

  1. Shit+CTRL+P Python: Create New Blank Jupyter Notebook (or anything that requires a kernel start).

Actual behavior

The following error message is out put:

Error: Activating Python 3.6.7 64-bit ('base': conda) to run Jupyter failed with Error: StdErr from ShellExec, ERROR: The system was unable to find the specified registry key or value. The system cannot find the batch label specified - End ERROR: The system was unable to find the specified registry key or value. The system cannot find the batch label specified - End . at A.checkUsable ({USER PATH}\.vscode\extensions\ms-python.python-2020.2.62710\out\client\extension.js:1:789593)

Expected behavior

A kernel starts up and I am good to go.

Your Jupyter and/or Python environment

Please provide as much info as you readily know

  • Jupyter server running: Local
  • Extension version: 2020.2.62710
  • VS Code version: 1.42
  • Python and/or Anaconda version: 3.6.7
  • OS: Windows Server 2016 x64 V 1607 Build 14393.3443
  • Virtual environment: conda

Developer Tools Console Output

Error Python Extension: 2020-02-12 12:12:28: getActivatedEnvironmentVariables, Class name = S, completed in 2306ms, Arg 1: undefined, Arg 2: {“architecture”:3,“path”:“{User PATH}\AppData\Local\Continuum\miniconda3\python.exe”,“version”:{“options”:{“loose”:false,“includePrerelease”:false},“loose”:false,“raw”:“3.6.7-final”,“major”:3,“minor”:6,“patch”:7,“prerelease”:[“final”],“build”:[],“version”:“3.6.7-final”},“sysPrefix”:“{USER PATH}\AppData\Local\Continuum\miniconda3”,“fileHash”:“9bc0d59d984e58ea93e155a75c16e113d4f3db9ea05aa3d03125468ae03343283656fd8cb17bb9472fb8f38b9b2ba176e6046867cbfc7d140b6fd79820f1e138”,“companyDisplayName”:“Anaconda, Inc.”,“type”:“Conda”,“envName”:“base”,“envPath”:“{USER PATH}\AppData\Local\Continuum\miniconda3”,“displayName”:“Python 3.6.7 64-bit (‘base’: conda)”}, Arg 3: true [Error: StdErr from ShellExec, ERROR: The system was unable to find the specified registry key or value. The system cannot find the batch label specified - End ERROR: The system was unable to find the specified registry key or value. The system cannot find the batch label specified - End

at S.getActivatedEnvironmentVariables ({USER PATH}.vscode\extensions\ms-python.python-2020.2.62710\out\client\extension.js:75:1159968)]

t.log @ console.ts:137 $logExtensionHostMessage @ mainThreadConsole.ts:39 _doInvokeHandler @ rpcProtocol.ts:398 _invokeHandler @ rpcProtocol.ts:383 _receiveRequest @ rpcProtocol.ts:299 _receiveOneMessage @ rpcProtocol.ts:226 (anonymous) @ rpcProtocol.ts:101 fire @ event.ts:582 fire @ ipc.net.ts:453 _receiveMessage @ ipc.net.ts:733 (anonymous) @ ipc.net.ts:592 fire @ event.ts:582 acceptChunk @ ipc.net.ts:239 (anonymous) @ ipc.net.ts:200 t @ ipc.net.ts:28 emit @ events.js:200 addChunk @ _stream_readable.js:294 readableAddChunk @ _stream_readable.js:275 Readable.push @ _stream_readable.js:210 onStreamRead @ internal/stream_base_commons.js:166

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
nickteffcommented, Feb 12, 2020

How about this?

Info Python Extension: 2020-02-12 15:43:35: Activating Environment to capture Environment variables, {PATH}/AppData/Local/Continuum/miniconda3/Scripts/activate && conda activate base && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python {path}/.vscode/extensions/ms-python.python-2020.2.62710/pythonFiles/printEnvVariables.py

0reactions
greazercommented, Mar 9, 2020

Issues labeled with “Info needed” are closed if we do not receive more information from the issue author in 2 weeks. If you are the issue author and you still are running into this problem, please reactivate with additional information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What to do when things go wrong - The Jupyter Notebook
Jupyter fails to start · Have you installed it? ;-) · If you're using a menu shortcut or Anaconda launcher to...
Read more >
How to fix Kernel Error or broken Python in Jupyter Notebook
TL;DW BELOW! If you delete or upgrade your python version, you might get a Kernel Error when trying to use Jupyter Notebooks!
Read more >
Failed to start the kernel in Jupyter Notebook - Stack Overflow
An alternative simple solution is: Open your Anaconda Prompt. Activate your env (this step is optional if you don't work with envs) ...
Read more >
Kernel Error – Jupyter Notebook - Tech……Answers
To open this, go to the search bar and type Anaconda Prompt and run it as Administrator. A black screen will appear with...
Read more >
launching jupyter i get kernel error · Issue #2301 - GitHub
Try deleting that kernelspec path (the python3 one, assuming that's what is failing to launch). It should fall back on running the kernel...
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