jupyter notebook 实现写代码自动补全功能

发布时间:2020-11-03 16:16:35 作者:Leah
来源:亿速云 阅读:571

这篇文章将为大家详细讲解有关jupyter notebook 实现写代码自动补全功能,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。

操作步骤

进入命令行环境。我使用的是conda。有两种方式进入命令行。

方法1:通过anconda navigator界面,选择environments,选择对应环境名,选择open terminal

方法2:直接使用cmd或者terminal等终端进入命令行。激活你想要配置代码补全的环境(如果是默认环境不用激活)

1.安装nbextensions 

pip install jupyter_contrib_nbextensions -i https://pypi.mirrors.ustc.edu.cn/simple
jupyter contrib nbextension install --user

2.安装nbextensions_configurator

pip install --user jupyter_nbextensions_configurator 
jupyter nbextensions_configurator enable --user

如果提示缺少依赖,就使用pip安装对应依赖即可。

重启jupyter,在弹出的主页面里,能看到增加了一个Nbextensions标签页,在这个页面里,勾选Hinterland即启用了代码自动补全,打开一个notebook感受一下吧。

jupyter notebook 实现写代码自动补全功能 

jupyter notebook 实现写代码自动补全功能 

jupyter notebook 实现写代码自动补全功能 

如果出现错误如下:

Installing collected packages: msgpack
Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。:
'E:\\JiangHeSong\\Anaconda35.2.0\\Lib\\site-packages\\msgpack\\_packer.cp36-win_
amd64.pyd'
Consider using the `--user` option or check the permissions.

You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and.

只需要加一个--user 例如:

pip install --user msgpack -i https://pypi.mirrors.ustc.edu.cn/simple

关于jupyter notebook 实现写代码自动补全功能就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

推荐阅读:
  1. Centos7安装Miniconda及配置jupyter
  2. jupyter实现重新加载模块的方法

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

jupyter notebook 全功能

上一篇:C语言使用IDE实现快速开发的方法

下一篇:SpringBoot 实现添加容器启动的初始化逻辑的方法

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》