jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.75k stars 4.99k forks source link

Jupyter Notebook: the connected sign keeps flashing infinitely! #5891

Open DemonsHunter opened 3 years ago

DemonsHunter commented 3 years ago

when I try to install the tensorflow and pytorch with GPU, I run following codes:

conda install -c anaconda tensorflow-gpu conda install pytorch torchvision cudatoolkit -c pytorch

then my jupyter notebook was broken! It keeps flashing the sign "Connected" and can not be used anymore...

I have tried to upgrade the jupyter, notebook and downgrade tornado, but it turns out that they are not of help.

here is my pip list: Package Version


-ip 20.0.2 argon2-cffi 20.1.0 astroid 2.4.2 async-generator 1.10 atomicwrites 1.4.0 attrs 20.2.0 Automat 20.2.0 backcall 0.2.0 beautifulsoup4 4.9.3 bleach 3.2.1 boto 2.49.0 boto3 1.16.1 botocore 1.19.1 bs4 0.0.1 certifi 2020.6.20 cffi 1.14.3 chardet 3.0.4 click 7.1.2 colorama 0.4.4 constantly 15.1.0 construct 2.10.56 cycler 0.10.0 Cython 0.29.14 decorator 4.4.2 defusedxml 0.6.0 docutils 0.16 entrypoints 0.3 Flask 1.1.2 future 0.18.2 gensim 3.8.3 graphviz 0.14.2 hyperlink 20.0.1 idna 2.10 imageio 2.9.0 incremental 17.5.0 iniconfig 1.1.1 ipykernel 5.3.4 ipython 7.19.0 ipython-genutils 0.2.0 ipywidgets 7.5.1 isort 5.6.4 itsdangerous 1.1.0 jedi 0.17.2 Jinja2 2.11.2 jmespath 0.10.0 joblib 0.17.0 jsonschema 3.2.0 jupyter 1.0.0 jupyter-client 5.3.4 jupyter-console 6.2.0 jupyter-core 4.6.3 jupyterlab-pygments 0.1.2 kiwisolver 1.2.0 lazy-object-proxy 1.5.1 lxml 4.6.1 MarkupSafe 1.1.1 matplotlib 3.3.2 mccabe 0.6.1 mistune 0.8.4 mysql-connector-python 8.0.22 Naked 0.1.31 nbclient 0.5.1 nbconvert 6.0.7 nbformat 5.0.8 nest-asyncio 1.4.2 nltk 3.5 notebook 6.1.5 numpy 1.19.2 opencv-python 4.4.0.44 packaging 20.4 pandas 1.1.3 pandocfilters 1.4.3 parso 0.7.1 pickleshare 0.7.5 Pillow 8.0.0 pip 20.2b1 pluggy 0.13.1 ply 3.11 prometheus-client 0.8.0 prompt-toolkit 3.0.5 protobuf 3.13.0 py 1.9.0 py4j 0.10.9.1 pyasn1 0.4.8 pycparser 2.20 pycryptodome 3.9.8 pycryptodomex 3.9.9 Pygments 2.7.2 PyHamcrest 2.0.2 pylint 2.6.0 pyparsing 2.4.7 pyrsistent 0.17.3 pysmi 0.3.4 pysnmp 4.4.12 pytest 6.1.1 python-dateutil 2.8.1 pytz 2020.1 pywin32 228 pywinpty 0.5.7 PyYAML 5.3.1 pyzmq 19.0.2 qtconsole 4.7.7 QtPy 1.9.0 re3py 0.31 regex 2020.10.15 requests 2.24.0 s3transfer 0.3.3 scikit-learn 0.23.2 scipy 1.5.3 seaborn 0.11.0 Send2Trash 1.5.0 setuptools 50.3.2 shellescape 3.8.1 six 1.15.0 skflow 0.1.0 sklearn 0.0 smart-open 3.0.0 soupsieve 2.0.1 tensor 0.3.6 tensor-sensor 0.1b6 terminado 0.9.1 testpath 0.4.4 threadpoolctl 2.1.0 toml 0.10.1 torch 1.6.0 torchvision 0.7.0 tornado 5.1.1 tqdm 4.50.2 traitlets 4.3.3 Twisted 20.3.0 urllib3 1.25.11 wcwidth 0.2.5 webencodings 0.5.1 Werkzeug 1.0.1 widgetsnbextension 3.5.1 wrapt 1.12.1 xgboost 1.2.1 xlwt 1.3.0 zope.interface 5.2.0

I desperately need to fix this problem due to many deadlines.. almost want to cry QAQ

truly grateful for any suggestions!

DemonsHunter commented 3 years ago

I forget to post the error message in jupyter client window:

[E 00:03:37.837 NotebookApp] Uncaught exception GET /api/kernels/36858018-1645-4a2d-b4af-718d827695ab/channels?session_id=728876FF3A3546BF808CFA468E343A24 (::1) HTTPServerRequest(protocol='http', host='localhost:8889', method='GET', uri='/api/kernels/36858018-1645-4a2d-b4af-718d827695ab/channels?session_id=728876FF3A3546BF808CFA468E343A24', version='HTTP/1.1', remote_ip='::1') Traceback (most recent call last): File "F:\anaconda_file2\envs\pytorch\lib\site-packages\tornado\websocket.py", line 546, in _run_callback result = callback(*args, **kwargs) File "C:\Users\lenovo\AppData\Roaming\Python\Python37\site-packages\notebook\services\kernels\handlers.py", line 258, in open super(ZMQChannelsHandler, self).open() File "C:\Users\lenovo\AppData\Roaming\Python\Python37\site-packages\notebook\base\zmqhandlers.py", line 168, in open self.send_ping, self.ping_interval, io_loop=loop, TypeError: init() got an unexpected keyword argument 'io_loop'

kevin-bates commented 3 years ago

Based on the traceback, you're not running notebook 6.1.5 since the io_loop parameter was removed 3 years ago. I also wouldn't recommend the downgrade of tornado. Please try updating both notebook and tornado and provide log details of any ensuing issues.

DemonsHunter commented 3 years ago

Thank you for your information, and I found that the version of notebook is totally different from "conda list" and "pip list"! Only when I make sure to update both of them will I sucessfully fix this problem, god this waste me last night... but anyway thank you again