jupyter没有代码提示的解决办法

1.安装 nbextensions

首先安装anaconda,anaconda有内置的jupyter

打开jupyter

jupyter没有代码提示的解决办法_第1张图片 

打开终端(如果自己的anaconda有多个python环境,默认是在base环境中,如果想换一个可以执行conda activate 环境名);

输入:

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

输入指令后同样等待安装完成,然后关闭Powershell窗口,重新启动 jupyter notebook,点击新增加的Nbextensions项;

jupyter没有代码提示的解决办法_第2张图片

取消勾选下图所示选项

jupyter没有代码提示的解决办法_第3张图片 

然后勾选Hinterland(代码提示/自动补全)和Autopep8(代码格式化)

jupyter没有代码提示的解决办法_第4张图片 

回到jupyter notebook 重新创建新项目,代码提示和自动补全的设置就完成了!点击工具栏右边的小锤子就可以实现代码格式化了!

 

 参考:https://www.pianshen.com/article/37961710387/

你可能感兴趣的:(jupyter,python,深度学习)