我是python扩展的新手,在安装了autopep8并运行后:
jupyter nbextension enable jupyter-autopep8-master/jupyter-autopep8
它回来了
启用笔记本扩展jupyter-autopep8-master / jupyter-autopep8 ... -验证:发现的问题: -需要吗? X jupyter-autopep8-master / jupyter-autopep8
但是我没有在ipynb界面上看到任何新按钮来将代码自动格式化为pep8。如何在ipynb中使用扩展名?谢谢。
答案 0 :(得分:0)
验证是否已安装autopep8,并从repo中安装扩展:
pip install autopep8
sudo jupyter nbextension install https://github.com/kenkoooo/jupyter-autopep8/archive/master.zip -
-user
sudo jupyter nbextension enable jupyter-autopep8-master/jupyter-autopep8
sudo jupyter nbextension list
根据Jupyter的设置,您可能需要重新启动Jupyter服务:
sudo service jupyter restart