Jupyter Notebook错误

14

我无法在浏览器中运行笔记本,它没有出现。控制台给了我以下错误信息。我已经安装了Anaconda。非常感谢任何帮助。

 C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\Cython\Distutils\old_build_ext.py:30: UserWarning: Cython.Distutils.old_build_ext does not properly handle dependencies and is deprecated.
  "Cython.Distutils.old_build_ext does not properly handle dependencies "
_cffi_ext.c
AppData\Roaming\Python\Python35\site-packages\zmq\backend\cffi\__pycache__\_cffi_ext.c(209): fatal error C1083: Cannot open include file: 'sys/un.h': No such file or directory
Traceback (most recent call last):
  File "C:\Users\Myamoto\Anaconda3\Scripts\jupyter-notebook-script.py", line 3, in <module>
    import notebook.notebookapp
  File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\notebook\notebookapp.py", line 32, in <module>
    from zmq.eventloop import ioloop
  File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\__init__.py", line 34, in <module>
    from zmq import backend
  File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\backend\__init__.py", line 40, in <module>
    reraise(*exc_info)
  File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
    raise value
  File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\backend\__init__.py", line 27, in <module>
    _ns = select_backend(first)
  File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\backend\select.py", line 26, in select_backend
    mod = __import__(name, fromlist=public_api)
  File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
    from . import (constants, error, message, context,
ImportError: cannot import name 'constants'

请查看此链接:https://dev59.com/uVgQ5IYBdhLWcg3wg0PS - Khalid Bin Huda
1个回答

34

我卸载了pyzmq并重新安装它:

pip uninstall pyzmq 
pip install pyzmq

这对我起作用了。

请注意,您可能还需要重新安装Jupyter笔记本以与最新版本的Python兼容。


3
Anaconda 2018.3 在 Windows 10 下似乎非常不稳定。 - ivan866
这对我有效 - 相关问题链接(提出的重复)无效。 - scign

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接