jupyter notebook设置
- 修改jupyter notebook工作目录
- jupyter notebook更换默认浏览器
- jupyter notebook安装拓展
- jupyter notebook汉化
修改jupyter notebook工作目录

在cmd执行:jupyter notebook --generate-config,执行成功后,会提示:
Writing default config to:C:Userslorel.jupyterjupyter_notebook_config.py

打开jupyter_notebook_config.py这个文件,找到参数c.NotebookApp.notebook_dir,把路径改成需要的工作路径。

上面的方法我的一台电脑修改成功了,另一台电脑不知道为什么不能修改,用下面的方法尝试终于修改成功了。
查看jupyter notebook的属性,选择快捷方式中的目标,将"%USERPROFILE%/"替换成要修改的工作路径。

jupyter notebook更换默认浏览器
将默认浏览器更换为chrome
同样打开文件jupyter_notebook_config.py,添加下面语句:
# c.NotebookApp.browser = ''''
import webbrowser
webbrowser.register(''chrome'', None, webbrowser.GenericBrowser(u''C:\Program Files (x86)\Google\Chrome\Application\chrome.exe''))
c.NotebookApp.browser = ''chrome''
jupyter notebook安装拓展
在cmd输入如下语句:
pip install jupyter_contrib_nbextensions
pip install jupyter_nbextensions_configurator
jupyter contrib nbextension install --user
重启jupyter notebook,会出现一栏nbextensions,勾选需要的插件,如Hinterland代码自动补全。
jupyter notebook汉化
方法一:安装git
下载地址:https://www.git-scm.com/download/win
安装完毕后,打开git bash,直接输入jupyter notebook,此时打开的浏览器显示中文。
方法二:添加环境变量

最后
以上就是单身唇彩最近收集整理的关于jupyter notebook相关设置修改jupyter notebook工作目录jupyter notebook更换默认浏览器jupyter notebook安装拓展jupyter notebook汉化的全部内容,更多相关jupyter内容请搜索靠谱客的其他文章。
发表评论 取消回复