我在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.
发布于 2021-03-01 22:24:01
您正在使用jupyter扩展,但您没有在python解释器中安装jupyter。只需'pip install jupyter',导出就可以了。如果你使用venv或其他虚拟环境,你应该在那里安装jupyter。
https://stackoverflow.com/questions/64535664
复制相似问题