实现自动代码补全,首先安装 nbextensions
pip install -i http://pypi.douban.com/simple --trusted-host pypi.douban.com jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
然后安装 nbextensions_configurator
pip install -i http://pypi.douban.com/simple --trusted-host pypi.douban.com jupyter_nbextensions_configurator
jupyter nbextensions_configurator enable --user
如果提示缺少依赖,就安装对应依赖即可。
最后重启 jupyter,在弹出的主页面里,能看到增加了一个 Nbextensions 标签页
,在这个页面里,勾选 Hinterland
即启用了代码自动补全,如图所示:
感谢参考:Jupyter Notebook主题字体设置及自动代码补全
-----------------分割线---------------
在代码中设置,按 Tab键代码自动提示
复制代码
1
2
3# Tab键代码自动提示 %config IPCompleter.greedy=True
最后
以上就是神勇超短裙最近收集整理的关于jupyter notebook实现自动代码补全的全部内容,更多相关jupyter内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复