安装Jupyter Notebook扩展

Lou*_*s M 5 python ipython-notebook ipython-magic jupyter jupyter-notebook

我尝试未成功安装Jupyter Notebook的某些扩展,但不知道该怎么做。所以基本上我想在笔记本中检查pep8代码。我检查了这篇文章: 在iPython笔记本代码中验证PEP8

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

jupyter nbextension install https://raw.githubusercontent.com/SiggyF/notebooks/master/pep8_magic.py --user
Run Code Online (Sandbox Code Playgroud)

所以我得到:

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
Run Code Online (Sandbox Code Playgroud)

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

~$ jupyter nbextension enable pep8_magic.py --user
Enabling notebook extension pep8_magic.py...
      - Validating: problems found:
        - require?  X pep8_magic.py
Run Code Online (Sandbox Code Playgroud)

没有成功。

有人可以解释一种简单的方法来使其正常工作,以及我错过的有关jupyter扩展的东西吗?

谢谢 !

小智 4

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

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