安装jupyter notebook扩展程序

7

我尝试安装一些jupyter notebook的扩展,但没有成功,也不知道该如何操作。 基本上,我想在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扩展方面错过了什么吗?

谢谢!

1个回答

4

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

目前正在测试,但看起来对我来说很好


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接