简体   繁体   中英

VS Code using Jupyter: Connecting to kernel: Python 3.6.9: Waiting for Jupyter Session to be idle

I am having trouble running my import statement in VS code Jupyter. I split them into individual cells. I find when I run

import numpy as np

the cell hangs and I get a message

Connecting to kernel: Python 3.6.9: Waiting for Jupyter Session to be idle

How do I fix this?

This may be related to the extended version. I hope this article is helpful to you.

Alright so this one surprised me..

I was using Jupyter-like code cells " #%% " (see docs ) to run jupyter notebook in VSCode. And I ran into the same issue as OP.

The error disappeared when I renamed my file, from "inspect.py" to "tmp.py".

I found my solution was to select the correct version of Python. I had 2 choices for Python 3.6.9. I chose the one called "base(Python 3.6.9)" which had a different location to "Python 3.6.9" and the base version worked. Something odd if going on here, maybe I should remove the other version?

For me, upgrading ipython to version 7.34.0 (from 7.32.0) fixed it. I'm using jedi version 0.18.1. Related

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