【发布时间】:2022-08-21 16:37:57
【问题描述】:
我目前正在学习代码并且在 python 中遇到了 Jupyter 的问题。
我用的是Python3.10,我已经升级了pip,模块在好PATH中,我已经导入了jupyter。
我尝试在解释器中以两种不同的方式打开笔记本:
#Input1
>>> jupyter notebook
#Output1
File \"<stdin>\", line 1
jupyter notebook
^^^^^^^^
SyntaxError: invalid syntax
#Input2
>>> py -3.9 -m jupyter notebook
#Output2
File \"<stdin>\", line 1
py -3.9 -m jupyter notebook
^^^^^^^
SyntaxError: invalid syntax
我也在终端做了它以防万一......但我得到了一些其他错误(从FR翻译):
jupyter-notebook: The term \"jupyter-notebook\" is not recognized as a name
cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path exists, verify that the
path is correct and try again.
To Line:1 character : 1
你知道发生了什么吗?
祝你有美好的一天 !
-
您是否在终端尝试过“jupyter notebook”?
-
是的 !第二个代码块是输入 \"jupyter notebook\" 时的输出!
-
您使用的是什么操作系统?
-
前缀
>>>看起来你在尝试启动笔记本服务器时已经在 Python 中,这不是它的设计工作方式。你应该在你的 shell 中(即 cmd 或 power shell,如果你在 Windows 中)。只需在那里运行您的py -3.9 -m jupyter notebook命令就可以了 -
看起来你在窗户上。你应该运行
py -m jupyter notebook在终端(不是提示。)。如果这不起作用,请检查您是否使用py -m pip install jupyter-notebook安装了jupyter-notebook
标签: python jupyter-notebook jupyter