gpt4 book ai didi

python - VSCode 无法将 jupyter notebook 导出到 html

转载 作者:行者123 更新时间:2023-12-04 14:26:36 31 4
gpt4 key购买 nike

我在 VSCode 中有一个 jupyter 笔记本,我正在尝试使用 VSCode 中的内置按钮将其导出到 html,但是我不断收到此错误,提示未找到“jupyter-nbconveter”。
我正在使用 pip 并让 pip 安装了任何与 jupyter 相关的东西:jupyter、jupyterlab、nbconvert、notebook。
任何想法可能导致问题?我正在使用 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.

最佳答案

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

关于python - VSCode 无法将 jupyter notebook 导出到 html,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64535664/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com