ipython / ipython/ipykernel

kernel dies just after starting if matplotlib is installed, works fine if not.

Đang mở
#798 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
734
Fork
412
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
8

Mô tả

When starting a notebook, if I have the package matplotlib installed in my environment, the notebook becomes unresponsive while running the first cell. This happens independently of which cell I'm running, even a simple `print("Hi")` will stay in the "running" state and not output anything.
If I pip uninstall matplotlib, the notebooks start working again, but of course, for most of my data science work I need matplotlib.
I've started a fresh installation of python (3.10) and tested adding and removing the packages I have in a separate computer, and tested uninstalling a few packages at a time.

I'm attaching my jupyter-troubleshoot output, and also the debug log of a failed session.
[jupyter-troubleshoot.txt](https://github.com/ipython/ipykernel/files/7521288/jupyter-troubleshoot.txt)
[notebooklog.txt](https://github.com/ipython/ipykernel/files/7521289/notebooklog.txt)
and here is the user-facing symptom:
![symptom](https://user-images.githubusercontent.com/72536471/141324235-d90833a4-0e22-4943-88ae-66435f20d826.png)

It seems that this error happens when things go wrong, but it does not appear when I remove matplotlib and try again:

`[D 08:47:00.499 NotebookApp] 200 GET /api/contents/merge_save_transports.ipynb/checkpoints?_=1636642019748 (::1) 20.940000ms
ERROR:asyncio:Exception in callback ()
handle: ()>
Traceback (most recent call last):
File "C:\Users\usangelipe\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task cb=[IOLoop.add_future..() at C:\Users\usangelipe\AppData\Roaming\Python\Python310\site-packages\tornado\ioloop.py:688]> while another task cb=[IOLoop.add_future..() at C:\Users\usangelipe\AppData\Roaming\Python\Python310\site-packages\tornado\ioloop.py:688]> is being executed.
ERROR:asyncio:Exception in callback ()
handle: ()>
Traceback (most recent call last):
File "C:\Users\usangelipe\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task cb=[IOLoop.add_future..() at C:\Users\usangelipe\AppData\Roaming\Python\Python310\site-packages\tornado\ioloop.py:688]> while another task cb=[IOLoop.add_future..() at C:\Users\usangelipe\AppData\Roaming\Python\Python310\site-packages\tornado\ioloop.py:688]> is being executed.
[D 08:47:00.545 NotebookApp] Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner`

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.