【问题标题】:Installing Jupyter Extension, Failure to Enable 'nbextension'安装 Jupyter 扩展,无法启用“nbextension”
【发布时间】:2019-08-05 05:33:06
【问题描述】:

我发布这个问题是因为我在对 SO 等进行多次筛选/故障排除时无法解决这个问题。

我已成功安装以下所有软件包,pip listconda list 显示:

我用来安装包的代码:

!pip install jupyter_contrib_nbextensions
!pip install https://github.com/ipythoncontrib/jupyter_contrib_nbextensions/tarball/master
jupyter contrib nbextension install --user

我也尝试了最后一行

jupyter contrib nbextensions install --sys-prefix --skip-running-check

我最终得到错误:

File "<ipython-input-5-1c0e089b301b>", line 1
    jupyter contrib nbextension install --user
                  ^
SyntaxError: invalid syntax

当以管理员模式在终端上运行时,我得到:

C:\WINDOWS\system32>python -m pip install jupyter_contib_nbextensions
Collecting jupyter_contib_nbextensions
ERROR: Could not find a version that satisfies the requirement jupyter_contib_nbextensions (from versions: none)
ERROR: No matching distribution found for jupyter_contib_nbextensions

我在这里缺少什么?我也试过升级jupyter, ipython;提前致谢。

【问题讨论】:

    标签: python-3.x jupyter-notebook


    【解决方案1】:
    1. 您必须在它前面加上 !在笔记本上运行时。因此语法无效。

    !jupyter contrib nbextension install --user
    
    1. 在您尝试安装的内容上输入错误。因此错误。 contib 应该是 contrib:

    python -m pip install jupyter_contrib_nbextensions
    

    希望对你有帮助。

    【讨论】:

    • 1 号解决了我的语法错误问题,但我也必须使用 ! 运行 2 号。试试如下:!python -m pip install jupyter_contrib_nbextensions
    【解决方案2】:

    添加!

    我正在复制粘贴来自 youtube 视频的命令。所以没有正确检查 我在跑步

    jupyter contrib nbextension install --user
    

    这给了我错误 但应该有一个“!”开始时。 应该是

    !jupyter contrib nbextension install --user
    

    【讨论】:

      猜你喜欢
      • 2021-06-07
      • 2020-01-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-21
      • 2023-02-24
      • 2021-01-10
      • 2019-10-30
      相关资源
      最近更新 更多