简体   繁体   中英

VSCode Jupyter not connecting to python kernel

Launching a cell will make this message appear: Connecting to kernel: Python 3.9.6 64-bit: Activating Python Environment 'Python 3.9.6 64-bit' . This message will then stay up loading indefinitely, without anything happening. No actual error message.

I've already tried searching for this problem, but every other post seem to obtain at least an error message, which isn't the case here. I still looked at some of these, which seemed to indicate the problem might have come from the traitlets package. I tried to downgrade it to what was recommended, but it didn't solve anything, so I reverted the downgrade.

The main problem here is that I have no idea what could cause such a problem, without even an error message. If you think additional info could help, please do ask, I have no idea what could be of use right now.

Not sure what did the trick but downgrading VSCode to November version and after that reinstalling Jupyter extension worked for me.

If anyone has the same problem, before reinstalling VSCode as the accepted answer said, try closing and reopening VSCode first.

That worked for me, saving me the agony of having to reinstall VSCode.

I am using mac.os. I moved vscode from the download folder to the application folder. This solved my problem.

I had VSCode installed in AppData folder, using so-called 'user installation' . I tried to restart, reinstall and downgrade VSCode, as other answers suggested, but nothing helped. Finally, I tried with another installation type - 'system installation' . It is a different setup file, and requires elevated privileges during installation. That solved the problem for me. So, one may try with different installation type.

i've just found out it's solved by simply just right clicking on code.exe, set to 'run as administrator', and done.

January 2023, none of the answers above are working for me (windows 10 + python 3.10.9 + VSCode x64-1.74.3). What made things work was downgrading VS Code. I arbitrarily chose VSCode x64-1.66.2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM