【发布时间】:2021-03-30 17:03:02
【问题描述】:
我有一个名为 testingJupyter.ipynb 的 .ipynb 文件,我想使用 Windows Powershell 将其转换为 .py 格式文件。
我已经运行了以下命令
pip install ipython
pip install nbconvert
然后我转到我的 testingJupyter.ipynb 文件所在的路径并运行以下命令
jupyter nbconvert --to script testingJupyter.ipynb
但我得到 错误:
jupyter : The term 'jupyter' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again."
我也试过运行以下命令
ipython nbconvert --to script testingJupyter.ipynb
即使这样我也得到 错误:
"ipython : The term 'ipython' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again."
我做错了什么?
【问题讨论】:
-
使用 jupyter 和 ipython 的完全限定路径,或将它们的目录添加到您的路径中。
-
@vonPryz 非常感谢您的回复。你能给我一个完全合格的路径的例子吗?我不知道它的意思。我试图谷歌它,但不明白如何给出完全限定的路径或如何添加目录。
标签: python powershell jupyter-notebook