【发布时间】:2020-08-26 20:14:23
【问题描述】:
当我尝试通过 cmd 访问 jupyter 时,它会在标题中显示错误行。
我正在使用 python 3.8.5 并使用 pip install jupyter 命令通过 pip 安装了 jupyter,它在 cmd 行中显示了以下消息
>pip install jupyter
Requirement already satisfied: jupyter in c:\users\this
pc\appdata\local\programs\python\python38\lib\site-packages (1.0.0)
Requirement already satisfied: jupyter-console in c:\users\this
pc\appdata\local\programs\python\python38\lib\site-packages (from jupyter) (6.1.0)
Requirement already satisfied: notebook in c:\users\this
pc\appdata\local\programs\python\python38\lib\site-packages (from jupyter) (6.1.3)
Requirement already satisfied: qtconsole in c:\users\this
pc\appdata\local\programs\python\python38\lib\site-packages (from jupyter) (4.7.6)
Requirement already satisfied: ipywidgets in c:\users\this
pc\appdata\local\programs\python\python38\lib\site-packages (from jupyter) (7.5.1)
Requirement already satisfied: ipykernel in c:\users\this pc\appdata\roaming\python\python38\site-
packages (from jupyter) (5.3.4)
Requirement already satisfied: nbconvert in c:\users\this
pc\appdata\local\programs\python\python38\lib\site-packages (from jupyter) (5.6.1)
Requirement already satisfied: pygments in c:\users\this pc\appdata\roaming\python\python38\site-
packages (from jupyter-console->jupyter) (2.6.1)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in c:\users\this
pc\appdata\roaming\python\python38\site-packages (from jupyter-console->jupyter) (3.0.6)
Requirement already satisfied: jupyter-client in c:\users\this
pc\appdata\roaming\python\python38\site-packages (from jupyter-console->jupyter) (6.1.6)
Requirement already satisfied: ipython in c:\users\this pc\appdata\roaming\python\python38\site-
packages (from jupyter-console->jupyter) (7.17.0)
Requirement already satisfied: Send2Trash in c:\users\this
pc\appdata\local\programs\python\python38\lib\site-packages (from notebook->jupyter) (1.5.0)
Requirement already satisfied: nbformat in c:\users\this
pc\appdata\local\programs\python\python38\lib\site-packages (from notebook->jupyter) (5.0.7)
Requirement already satisfied: pyzmq>=17 in c:\users\this pc\appdata\roaming\python\python38\site-
packages (from notebook->jupyter) (19.0.2)
Requirement already satisfied: terminado>=0.8.3 in c:\users\this
pc\appdata\local\programs\python\python38\lib\site-packages (from notebook->jupyter) (0.8.3)
Requirement already satisfied: prometheus-client in c:\users\this
pc\appdata\local\programs\python\python38\lib\site-packages (from notebook->jupyter) (0.8.0)
Requirement already satisfied: traitlets>=4.2.1 in c:\users\this
pc\appdata\roaming\python\python38\site-packages (from notebook->jupyter) (4.3.3)
Requirement already satisfied: argon2-cffi in c:\users\this
pc\appdata\local\programs\python\python38\lib\site-packages (from notebook->jupyter) (20.1.0)
Requirement already satisfied: jinja2 in c:\users\this
pc\appdata\local\programs\python\python38\lib\site-packages (from notebook->jupyter) (2.11.2)
Requirement already satisfied: tornado>=5.0 in c:\users\this pc\appdata\roaming\python\python38\site-
packages (from notebook->jupyter) (6.0.4)
Requirement already satisfied: jupyter-core>=4.6.1 in c:\users\this
pc\appdata\roaming\python\python38\site-packages (from notebook->jupyter) (4.6.3)
...
WARNING: You are using pip version 20.1.1; however, version 20.2.2 is available.
You should consider upgrading via the 'c:\users\this
pc\appdata\local\programs\python\python38\python.exe -m pip install --upgrade pip' command.
之后,我尝试通过以下 cmd 行 python -m jupyter 命令访问 jupyter notebook,但它没有在网络浏览器中打开,而是显示以下错误消息。
Traceback (most recent call last):
File "c:\users\this pc\appdata\local\programs\python\python38\lib\runpy.py", line 194, in
_run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\this pc\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\This PC\AppData\Local\Programs\Python\Python38\Scripts\jupyter-
notebook.EXE\__main__.py", line 4, in <module>
File "c:\users\this pc\appdata\local\programs\python\python38\lib\site-
packages\notebook\notebookapp.py", line 51, in <module>
from zmq.eventloop import ioloop
File "C:\Users\This PC\AppData\Roaming\Python\Python38\site-packages\zmq\__init__.py", line 50, in
<module>
from zmq import backend
File "C:\Users\This PC\AppData\Roaming\Python\Python38\site-packages\zmq\backend\__init__.py", line
40, in <module>
reraise(*exc_info)
File "C:\Users\This PC\AppData\Roaming\Python\Python38\site-packages\zmq\utils\sixcerpt.py", line 34,
in reraise
raise value
File "C:\Users\This PC\AppData\Roaming\Python\Python38\site-packages\zmq\backend\__init__.py", line
27, in <module>
_ns = select_backend(first)
File "C:\Users\This PC\AppData\Roaming\Python\Python38\site-packages\zmq\backend\select.py", line
28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\This PC\AppData\Roaming\Python\Python38\site-
packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: cannot import name 'constants' from partially initialized module 'zmq.backend.cython'
(most likely due to a circular import) (C:\Users\This PC\AppData\Roaming\Python\Python38\site-
packages\zmq\backend\cython\__init__.py)
请注意
- 我已经将 python 添加到环境变量中,所以没有任何问题。我检查了两次。
在路径文件夹中我有这些项目
那我现在该怎么办?
【问题讨论】: