Python import fails when there is a jupyter notebook files in the same directory.
$ cat a.py from b import ( test ) test() $ cat b.py def test(): print("hoge")
Jupyter notebook c.py.
CTRL-C CTRL-C in the a.py in emacs and it shows the error.
Once it failed, it start showing another error of
no module named.
Without jupyter notebooks in the same directory, it works.
$ cat /etc/os-release NAME="Ubuntu" VERSION="20.04.2 LTS (Focal Fossa)"
GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.14) of 2020-03-26, modified by Debian
It looks the jupyter console reported issue is relevant.
I have a similar issue; a Void Linux contributor has PR'ed an omnipus jupyter update and running jupyter console triggers the RuntimeWarning about ZMQSocketChannel.msg_ready not being awaited. Downgrading only python3-jupyter_client to 6.1.0_2 (the version currently packaged in Void) resolves the issue.
PyZMQ is installed via the python3-pyzmq-22.1.0_1 package in Void, although an earlier version also triggered the issue.
On python3.7, downgrading from jupyter-client 7.0.1 to 6.1.12 worked for me.
Run below and the issue apparently is gone.
pip install jupyter-client==6.1.12
Please help understand what is causing this issue and how to fix it.