VSCode无法将jupyter笔记本导出到html [英] VSCode fails to export jupyter notebook to html

查看:50
本文介绍了VSCode无法将jupyter笔记本导出到html的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VSCode中有一个jupyter笔记本,我正尝试使用VSCode中的内置按钮将其导出到html,但是我一直收到此错误,指出找不到‘jupyter-nbConvereter’。

我正在使用pip,并让pip安装我能安装的任何与jupyter相关的东西:jupyter、jupyterlab、nbConvert、笔记本。

您知道可能是什么原因导致此问题吗?我正在使用Windows 10。

> C:Python38python.exe c:UsersToshiba.vscodeextensionsms-python.python-2020.9.114305pythonFilespyvsc-run-isolated.py jupyter nbconvert --version
> C:Python38python.exe c:UsersToshiba.vscodeextensionsms-python.python-2020.9.114305pythonFilespyvsc-run-isolated.py jupyter nbconvert --version
Error 2020-10-26 10:40:19: Export failed [r [Error]: Traceback (most recent call last):
  File "c:UsersToshiba.vscodeextensionsms-python.python-2020.9.114305pythonFilespyvsc-run-isolated.py", line 26, in <module>
    runpy.run_module(module, run_name="__main__", alter_sys=True)
  File "C:Python38lib
unpy.py", line 207, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "C:Python38lib
unpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "C:Python38lib
unpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:UsersToshibaAppDataRoamingPythonPython38site-packagesjupyter.py", line 4, in <module>
    main()
  File "C:UsersToshibaAppDataRoamingPythonPython38site-packagesjupyter_corecommand.py", line 247, in main
    command = _jupyter_abspath(subcommand)
  File "C:UsersToshibaAppDataRoamingPythonPython38site-packagesjupyter_corecommand.py", line 133, in _jupyter_abspath
    raise Exception(
Exception: Jupyter command `jupyter-nbconvert` not found.

推荐答案

  1. pip uninstall nbconvert

  2. 以管理员身份运行CMD

  3. pip install nbconvert

我也遇到了同样的问题,按照上面的步骤解决了它。此解决方案来自this thread

这篇关于VSCode无法将jupyter笔记本导出到html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆