Python VSCode无法将jupyter笔记本导出为html

Python VSCode无法将jupyter笔记本导出为html,python,python-3.x,visual-studio-code,jupyter-notebook,jupyter,Python,Python 3.x,Visual Studio Code,Jupyter Notebook,Jupyter,我在VSCode中有一个jupyter笔记本,我正试图使用VSCode中的内置按钮将其导出为html,但我一直收到这样一个错误,即未找到“jupyter nbconveter” 我正在使用pip,并让pip安装任何与jupyter相关的我能安装的东西:jupyter、jupyterlab、nbconvert、笔记本电脑 你知道是什么导致了这个问题吗?我用的是Windows10 > C:\Python38\python.exe c:\Users\Toshiba\.vscode\extensi

我在VSCode中有一个jupyter笔记本,我正试图使用VSCode中的内置按钮将其导出为html,但我一直收到这样一个错误,即未找到“jupyter nbconveter”

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

你知道是什么导致了这个问题吗?我用的是Windows10

> 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.

>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
错误2020-10-26 10:40:19:导出失败[r[错误]:回溯(最近一次调用):
文件“c:\Users\Toshiba\.vscode\extensions\ms python.python-2020.9.114305\pythonFiles\pyvsc run insolated.py”,第26行,在
runpy.run\u模块(模块,run\u name=“\uuuuuu main\uuuuuu”,alter\u sys=True)
文件“C:\Python38\lib\runpy.py”,第207行,在run\u模块中
返回\u运行\u模块\u代码(代码、初始化全局、运行\u名称、模块规格)
文件“C:\Python38\lib\runpy.py”,第97行,在运行模块代码中
_运行代码(代码、mod_globals、init_globals、,
文件“C:\Python38\lib\runpy.py”,第87行,在运行代码中
exec(代码、运行\全局)
文件“C:\Users\Toshiba\AppData\Roaming\Python38\site packages\jupyter.py”,第4行,在
main()
文件“C:\Users\Toshiba\AppData\Roaming\Python38\site packages\jupyter\u core\command.py”,主目录第247行
命令=_jupyter_abspath(子命令)
文件“C:\Users\Toshiba\AppData\Roaming\Python38\site packages\jupyter\u core\command.py”,第133行,在jupyter\u abspath中
引发异常(
异常:未找到Jupyter命令'Jupyter nbconvert'。

您正在使用jupyter扩展,但您没有在python解释器中安装jupyter。只需“pip install jupyter”,导出即可。
如果您使用的是venv或其他虚拟环境,您应该在那里安装jupyter。

您使用的是jupyter扩展,但没有在python解释器中安装jupyter。只需“pip install jupyter”,导出即可。
如果您使用的是venv或其他虚拟环境,您应该在那里安装jupyter。

当您键入“jupyter nbconvert--version”时,它是否会输出其版本号在VSCode终端中?由于VSCode中的Jupyter notebook函数是由python扩展提供的,因此建议您使用最新版本的python扩展或尝试其他版本的python扩展。当我在VSCode终端中键入该函数时,我得到以下错误:术语“Jupyter”未被识别为cmdlet、函数、脚本文件或可操作程序的名称。请检查名称的拼写,或者检查是否包含路径,验证路径是否正确,然后重试。我已安装了最新版本的VSCode Python扩展名以及2020.9.114305。是否最好在其github上提出问题?您可以尝试“python-m笔记本”,并尝试使用不同的VSCode环境。当您键入“jupyter nbconvert--version”时,它是否会输出其版本号"在VSCode终端中?由于VSCode中的Jupyter notebook函数是由python扩展提供的,因此建议您使用最新版本的python扩展或尝试其他版本的python扩展。当我在VSCode终端中键入该函数时,我得到以下错误:术语“Jupyter”未被识别为cmdlet、函数、脚本文件或可操作程序的名称。请检查名称的拼写,或者检查是否包含路径,验证路径是否正确,然后重试。我已安装了最新版本的VSCode Python扩展名以及2020.9.114305。是否最好在其github上提出问题?您可以尝试“python-m笔记本”,并尝试使用不同的VSCode环境。嗨,Elliot!请在发布答案时正确设置代码格式。你可以阅读更多信息嗨,Elliot!请在发布答案时正确设置代码格式。你可以阅读更多信息