【问题标题】:Installing a jupyter notebook extension安装 jupyter notebook 扩展
【发布时间】:2017-01-11 10:00:18
【问题描述】:

我尝试为 jupyter notebook 安装一些扩展但没有成功,但不知道该怎么做。 所以基本上我想在我的笔记本中检查 pep8 代码。 我检查了这篇文章: Verifying PEP8 in iPython notebook code

但是 %install_ext 已被弃用,所以我使用了

jupyter nbextension install https://raw.githubusercontent.com/SiggyF/notebooks/master/pep8_magic.py --user

所以我得到:

Copying: /tmp/tmpw74yl7m2/pep8_magic.py -> /home/louis/.local/share/jupyter/nbextensions/pep8_magic.py

To initialize this nbextension in the browser every time the notebook (or other app) loads:

          jupyter nbextension enable <the entry point> --user

从现在开始,我无法让它工作。 我试过了:

~$ jupyter nbextension enable pep8_magic.py --user
Enabling notebook extension pep8_magic.py...
      - Validating: problems found:
        - require?  X pep8_magic.py

没有成功。

有人可以解释一个简单的方法来让它工作以及我错过了关于 jupyter 扩展的什么吗?

谢谢!

【问题讨论】:

    标签: python ipython-notebook jupyter-notebook jupyter ipython-magic


    【解决方案1】:

    我从链接中手动复制了文件,然后添加到 /.ipython/extensions(或 /nbextensions)并加载到笔记本中:%load_ext pep8_magic

    目前正在测试,但对我来说看起来不错

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-03-15
      • 1970-01-01
      • 2021-01-10
      • 1970-01-01
      • 1970-01-01
      • 2018-07-20
      • 2021-04-20
      • 2017-12-01
      相关资源
      最近更新 更多