jupyter notebook中设置代码的自动补全功能

时间:2024-03-16 19:21:46

jupyter notebook怎样设置代码的自动补全功能

1、安装对应所需模块

打开anaconda的PowerShell(带有Prompt的)

jupyter notebook中设置代码的自动补全功能

直接输入:pip install jupyter_contrib_nbextensions
回车开始安装。
jupyter notebook中设置代码的自动补全功能

安装成功的显示:

jupyter notebook中设置代码的自动补全功能
出现“successful installed”即说明安装成功

2、启用用户配置

按照1的操作安装成功后;
输入:jupyter contrib nbextension install --user 进行用户配置。
jupyter notebook中设置代码的自动补全功能重新打开按1的步骤打开 jupyter notebook
jupyter notebook中设置代码的自动补全功能
发现顶部菜单栏多了nbextensions选项

3、 启用自动补全功能
jupyter notebook中设置代码的自动补全功能
取消锁定勾选,并勾选Highlight selected word

jupyter notebook中设置代码的自动补全功能
即可成功使用代码自动补全功能

演示:
jupyter notebook中设置代码的自动补全功能
输入部分字母 > 按tab键 > 选择目标代码