[英]'jupyter' is not recognized as an internal or external command, operable program or batch file in Windows 10
When I try to access jupyter via cmd it gives me the error line in the title.当我尝试通过 cmd 访问 jupyter 时,它给了我标题中的错误行。 I'm using python 3.8.5 and installed jupyter via pip using
pip install jupyter
command and it showed me the following message in the cmd line我正在使用 python 3.8.5 并使用
pip install jupyter
命令通过pip install 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.
After that I tried to access jupyter notebook by the following cmd line python -m jupyter
command but instead of opening in a web browser it is showing me the following error message.之后,我尝试通过以下 cmd 行
python -m jupyter
命令访问 jupyter notebook,但不是在 Web 浏览器中打开,而是向我显示以下错误消息。
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)
Note that注意
In the path folder I've these items在路径文件夹中我有这些项目
so what should I do now?那我现在该怎么办?
Try using jupyter notebook alone.尝试单独使用jupyter notebook 。 From my knowledge, python -m is for referencing modules and it could just be causing problems.
据我所知, python -m 用于引用模块,它可能只是导致问题。
Finally solved it, I had to reinstall everything and add another path option to the environment variable which is C:\\Users\\This PC\\AppData\\Roaming\\Python\\Python38\\Scripts
the previous path was in the local folder and this one is in the Roaming folder.终于解决了,我不得不重新安装所有东西并向环境变量添加另一个路径选项,即
C:\\Users\\This PC\\AppData\\Roaming\\Python\\Python38\\Scripts
之前的路径在本地文件夹中,而这个在漫游文件夹。 This did the trick for me.这对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.