【发布时间】:2021-02-08 14:58:14
【问题描述】:
我在 VSCode 中有一个 jupyter 笔记本,我正在尝试使用 VSCode 中的内置按钮将其导出为 html,但是我不断收到此错误消息,提示找不到“jupyter-nbconveter”。
我正在使用 pip 并且 pip 安装了任何与 jupyter 相关的东西:jupyter、jupyterlab、nbconvert、笔记本。
任何想法可能导致问题?我使用的是 Windows 10。
> C:\Python38\python.exe c:\Users\Toshiba\.vscode\extensions\ms-python.python-2020.9.114305\pythonFiles\pyvsc-run-isolated.py jupyter nbconvert --version
> C:\Python38\python.exe c:\Users\Toshiba\.vscode\extensions\ms-python.python-2020.9.114305\pythonFiles\pyvsc-run-isolated.py jupyter nbconvert --version
Error 2020-10-26 10:40:19: Export failed [r [Error]: Traceback (most recent call last):
File "c:\Users\Toshiba\.vscode\extensions\ms-python.python-2020.9.114305\pythonFiles\pyvsc-run-isolated.py", line 26, in <module>
runpy.run_module(module, run_name="__main__", alter_sys=True)
File "C:\Python38\lib\runpy.py", line 207, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "C:\Python38\lib\runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "C:\Python38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Toshiba\AppData\Roaming\Python\Python38\site-packages\jupyter.py", line 4, in <module>
main()
File "C:\Users\Toshiba\AppData\Roaming\Python\Python38\site-packages\jupyter_core\command.py", line 247, in main
command = _jupyter_abspath(subcommand)
File "C:\Users\Toshiba\AppData\Roaming\Python\Python38\site-packages\jupyter_core\command.py", line 133, in _jupyter_abspath
raise Exception(
Exception: Jupyter command `jupyter-nbconvert` not found.
【问题讨论】:
-
在 VSCode 终端输入“jupyter nbconvert --version”时是否输出其版本号?由于 VSCode 中的 Jupyter notebook 功能是由 python 扩展提供的,因此建议您使用最新版本的 python 扩展或尝试其他版本的 python 扩展。
-
当我在 VSCode 终端中键入时,我收到以下错误
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.我还安装了最新版本的 VSCode Python 扩展 2020.9.114305。在他们的 github 上提出问题会更好吗? -
你可以试试“python -m notebook”,尝试使用不同的VSCode环境。
标签: python python-3.x visual-studio-code jupyter-notebook jupyter