Jupyter笔记本无法打开

问题描述 投票:1回答:1

当我打开Anaconda Prompt并运行jupyter notebook时,我收到以下错误:

(base) C:\Users\Marco.Gorelli>jupyter notebook
Traceback (most recent call last):
  File "C:\Users\Marco.Gorelli\AppData\Local\Continuum\anaconda3\Scripts\jupyter-notebook-script.py", line 6, in <module>
    from notebook.notebookapp import main
  File "C:\Users\Marco.Gorelli\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\notebookapp.py", line 46, in <module>
    from zmq.eventloop import ioloop
  File "C:\Users\Marco.Gorelli\AppData\Local\Continuum\anaconda3\lib\site-packages\zmq\__init__.py", line 47, in <module>
    from zmq import backend
  File "C:\Users\Marco.Gorelli\AppData\Local\Continuum\anaconda3\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
    reraise(*exc_info)
  File "C:\Users\Marco.Gorelli\AppData\Local\Continuum\anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
    raise value
  File "C:\Users\Marco.Gorelli\AppData\Local\Continuum\anaconda3\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
    _ns = select_backend(first)
  File "C:\Users\Marco.Gorelli\AppData\Local\Continuum\anaconda3\lib\site-packages\zmq\backend\select.py", line 26, in select_backend
    mod = __import__(name, fromlist=public_api)
  File "C:\Users\Marco.Gorelli\AppData\Local\Continuum\anaconda3\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
    from . import (constants, error, message, context,
ImportError: cannot import name 'constants' from 'zmq.backend.cython' (C:\Users\Marco.Gorelli\AppData\Local\Continuum\anaconda3\lib\site-packages\zmq\backend\cython\__init__.py)

我不明白错误信息。

版本:Cone 4.5.11 Python 3.7.0

python jupyter-notebook
1个回答
0
投票

您似乎没有遵循导入的正确文件夹/模块结构

  • 首先检查Anaconda中的默认文件夹

如果可以,请检查您使用的开始菜单快捷方式是否显示正确的文件夹并进行必要的更改

  • 右键单击:选择属性
  • 从许多选项卡,转到选项卡“快捷方式”
  • 将“Starts in”旁边的条目复制到文件中,并将此条目文件保存到桌面,这样您就可以备份并恢复它。
  • 将错误的路径更改为anaconda文件夹所在的文件夹(包含所有python工作的文件夹)

重启anaconda

© www.soinside.com 2019 - 2024. All rights reserved.