我是靠谱客的博主 神勇超短裙,这篇文章主要介绍jupyter notebook实现自动代码补全,现在分享给大家,希望可以做个参考。

实现自动代码补全,首先安装 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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(116)

评论列表共有 0 条评论

立即
投稿
返回
顶部