[英]Jupyter Notebook with python 3 not running
我无法使用Python 3打开jupyter笔记本。我安装了Anaconda for Python 2和Anaconda for Python 3(对于Windows都是64位)。 如果我为Python 2运行jupyter笔记本,一切正常,但是使用Python 3它不起作用。 我已经重新安装了Anaconda 3(4.2版本= Python 3.5),但这没有帮助。 我也尝试了所有的谷歌搜索结果。 当我从anacoda提示符运行jupyter笔记本时,我仍然会收到以下错误。 任何帮助都非常感谢。
(C:\Users\Myamoto\Anaconda3) C:\Users\Myamoto>jupyter notebook
_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\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 31, 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'
pip uninstall pyzmq
在那之后
pip install pyzmq.
感谢Muten_Roshi。 这种方法效果很好。
问题出在pyzmq上,但正在运行:
pip uninstall pyzmq
可能以错误结束Cannot uninstall 'pyzmq'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Cannot uninstall 'pyzmq'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
如果您正在使用Anaconda,这样的命令链可能有所帮助(它实际上解决了我的问题):
conda uninstall pyzmq
conda install pyzmq
conda install jupyter
我找到了一个适合我的解决方案。 在python3中重新安装pyzmq
如果你们中的任何人有同样的问题,我希望有助于解决它。
我遇到了与spyder类似的问题。 我卸载了所有创建问题的软件包,我也卸载了spyder。
Conda remove packages
conda install packages
它又开始工作了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.