当我右键单击 Visual Studio Code 中的 .py 文件并说Run Current File in Python Interactive Window
我收到错误消息时Error attempting to locate jupyter
。然后我点击install
它,它告诉我所有的要求都已经满足了。
我该怎么办?
以下是命令行的详细信息:
pip install jupyter
Requirement already satisfied: jupyter in c:\users\rje\appdata\roaming\python\python38\site-packages (1.0.0)
Requirement already satisfied: notebook in c:\users\rje\appdata\roaming\python\python38\site-packages (from jupyter) (6.0.2)
Requirement already satisfied: jupyter-console in c:\users\rje\appdata\roaming\python\python38\site-packages (from jupyter) (6.0.0)
Requirement already satisfied: ipywidgets in c:\users\rje\appdata\roaming\python\python38\site-packages (from jupyter) (7.5.1)
Requirement already satisfied: nbconvert in c:\users\rje\appdata\roaming\python\python38\site-packages (from jupyter) (5.6.1)
Requirement already satisfied: ipykernel in c:\users\rje\appdata\roaming\python\python38\site-packages (from jupyter) (5.1.3)
Requirement already satisfied: qtconsole in c:\users\rje\appdata\roaming\python\python38\site-packages (from jupyter) (4.6.0)
Requirement already satisfied: jupyter-client>=5.3.4 in c:\users\rje\appdata\roaming\python\python38\site-packages (from notebook->jupyter) (5.3.4)
Requirement already satisfied: tornado>=5.0 in c:\users\rje\appdata\roaming\python\python38\site-packages (from notebook->jupyter) (6.0.3)
Requirement already satisfied: terminado>=0.8.1 in c:\users\rje\appdata\roaming\python\python38\site-packages (from notebook->jupyter) (0.8.3)
Requirement already satisfied: prometheus-client in c:\users\rje\appdata\roaming\python\python38\site-packages (from notebook->jupyter) (0.7.1)
Requirement already satisfied: ipython-genutils in c:\users\rje\appdata\roaming\python\python38\site-packages (from notebook->jupyter) (0.2.0)
Requirement already satisfied: jinja2 in c:\users\rje\appdata\roaming\python\python38\site-packages (from notebook->jupyter) (2.10.3)
Requirement already satisfied: pyzmq>=17 in c:\users\rje\appdata\roaming\python\python38\site-packages (from notebook->jupyter) (18.1.1)
Requirement already satisfied: nbformat in c:\users\rje\appdata\roaming\python\python38\site-packages (from notebook->jupyter) (4.4.0)
Requirement already satisfied: traitlets>=4.2.1 in c:\users\rje\appdata\roaming\python\python38\site-packages (from notebook->jupyter) (4.3.3)
Requirement already satisfied: jupyter-core>=4.6.0 in c:\users\rje\appdata\roaming\python\python38\site-packages (from notebook->jupyter) (4.6.1)
Requirement already satisfied: Send2Trash in c:\users\rje\appdata\roaming\python\python38\site-packages (from notebook->jupyter) (1.5.0)
Requirement already satisfied: pygments in c:\users\rje\appdata\roaming\python\python38\site-packages (from jupyter-console->jupyter) (2.4.2)
Requirement already satisfied: ipython in c:\users\rje\appdata\roaming\python\python38\site-packages (from jupyter-console->jupyter) (7.9.0)
Requirement already satisfied: prompt-toolkit<2.1.0,>=2.0.0 in c:\users\rje\appdata\roaming\python\python38\site-packages (from jupyter-console->jupyter) (2.0.10)
Requirement already satisfied: widgetsnbextension~=3.5.0 in c:\users\rje\appdata\roaming\python\python38\site-packages (from ipywidgets->jupyter) (3.5.1)
Requirement already satisfied: bleach in c:\users\rje\appdata\roaming\python\python38\site-packages (from nbconvert->jupyter) (3.1.0)
Requirement already satisfied: mistune<2,>=0.8.1 in c:\users\rje\appdata\roaming\python\python38\site-packages (from nbconvert->jupyter) (0.8.4)
Requirement already satisfied: pandocfilters>=1.4.1 in c:\users\rje\appdata\roaming\python\python38\site-packages (from nbconvert->jupyter) (1.4.2)
Requirement already satisfied: testpath in c:\users\rje\appdata\roaming\python\python38\site-packages (from nbconvert->jupyter) (0.4.4)
Requirement already satisfied: defusedxml in c:\users\rje\appdata\roaming\python\python38\site-packages (from nbconvert->jupyter) (0.6.0)
Requirement already satisfied: entrypoints>=0.2.2 in c:\users\rje\appdata\roaming\python\python38\site-packages (from nbconvert->jupyter) (0.3)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\rje\appdata\roaming\python\python38\site-packages (from jupyter-client>=5.3.4->notebook->jupyter) (2.8.1)
Requirement already satisfied: pywin32>=1.0; sys_platform == "win32" in c:\users\rje\appdata\roaming\python\python38\site-packages (from jupyter-client>=5.3.4->notebook->jupyter) (227)
Requirement already satisfied: pywinpty>=0.5; os_name == "nt" in c:\users\rje\appdata\roaming\python\python38\site-packages (from terminado>=0.8.1->notebook->jupyter) (0.5.5)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\rje\appdata\roaming\python\python38\site-packages (from jinja2->notebook->jupyter) (1.1.1)
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in c:\users\rje\appdata\roaming\python\python38\site-packages (from nbformat->notebook->jupyter) (3.2.0)
Requirement already satisfied: six in c:\users\rje\appdata\roaming\python\python38\site-packages (from traitlets>=4.2.1->notebook->jupyter) (1.13.0)
Requirement already satisfied: decorator in c:\users\rje\appdata\roaming\python\python38\site-packages (from traitlets>=4.2.1->notebook->jupyter) (4.4.1)
Requirement already satisfied: backcall in c:\users\rje\appdata\roaming\python\python38\site-packages (from ipython->jupyter-console->jupyter) (0.1.0)
Requirement already satisfied: setuptools>=18.5 in c:\users\rje\appdata\local\programs\python\python38\lib\site-packages (from ipython->jupyter-console->jupyter) (41.2.0)
Requirement already satisfied: pickleshare in c:\users\rje\appdata\roaming\python\python38\site-packages (from ipython->jupyter-console->jupyter) (0.7.5)
Requirement already satisfied: jedi>=0.10 in c:\users\rje\appdata\roaming\python\python38\site-packages (from ipython->jupyter-console->jupyter) (0.15.1)
Requirement already satisfied: colorama; sys_platform == "win32" in c:\users\rje\appdata\roaming\python\python38\site-packages (from ipython->jupyter-console->jupyter) (0.4.1)
Requirement already satisfied: wcwidth in c:\users\rje\appdata\roaming\python\python38\site-packages (from prompt-toolkit<2.1.0,>=2.0.0->jupyter-console->jupyter) (0.1.7)
Requirement already satisfied: webencodings in c:\users\rje\appdata\roaming\python\python38\site-packages (from bleach->nbconvert->jupyter) (0.5.1)
Requirement already satisfied: pyrsistent>=0.14.0 in c:\users\rje\appdata\roaming\python\python38\site-packages (from jsonschema!=2.5.0,>=2.4->nbformat->notebook->jupyter) (0.15.5)
Requirement already satisfied: attrs>=17.4.0 in c:\users\rje\appdata\roaming\python\python38\site-packages (from jsonschema!=2.5.0,>=2.4->nbformat->notebook->jupyter) (19.3.0)
Requirement already satisfied: parso>=0.5.0 in c:\users\rje\appdata\roaming\python\python38\site-packages (from jedi>=0.10->ipython->jupyter-console->jupyter) (0.5.1)
但是之后
python -m jupyter notebook --version
Traceback (most recent call last):
File "C:\Users\rje\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 192, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\rje\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\rje\AppData\Roaming\Python\Python38\site-packages\jupyter.py", line 10, in <module>
run_module('jupyter_core')
File "C:\Users\rje\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 208, in run_module
return _run_code(code, {}, init_globals, run_name, mod_spec)
File "C:\Users\rje\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\rje\AppData\Roaming\Python\Python38\site-packages\jupyter_core\__main__.py", line 3, in <module>
main()
File "C:\Users\rje\AppData\Roaming\Python\Python38\site-packages\jupyter_core\command.py", line 247, in main
command = _jupyter_abspath(subcommand)
File "C:\Users\rje\AppData\Roaming\Python\Python38\site-packages\jupyter_core\command.py", line 133, in _jupyter_abspath
raise Exception(
Exception: Jupyter command `jupyter-notebook` not found.