步骤一:安装jupyter notebook
步骤二:找到jupyter notebook 配置文件的位置
步骤三:打开配置文件jupyter_notebook_config.py,作出如下修改:
找到 c.NotebookApp.notebook_dir 这个变量,将你希望的路径赋值给 这个变量,并删除这一行前面的“#”
• 一定要确保删除 “#”,取消这一行的注释模式
• 这一行代码前不能有空格
• 路径一定要是已经存在的,否则会闪退,且路径要用英文单引号括起来 • 路径要写\\转义, 或者在路径字符串前用r标识
步骤四:实现代码自动补全
安装nbextensions
pip install jupyter_contrib_nbextensions jupyter contrib nbextension install --user
安装nbextensions_configurator
pip install --user jupyter_nbextensions_configurator jupyter nbextensions_configurator enable --user
重启jupyter,能看到增加了一个Nbextensions标签页,在这个页面里, 勾选Hinterland即启用了代码自动补全
标签:jupyter,补全,代码,路径,notebook,nbextensions From: https://www.cnblogs.com/yccy/p/16989015.html