我是靠谱客的博主 单身唇彩,这篇文章主要介绍jupyter notebook相关设置修改jupyter notebook工作目录jupyter notebook更换默认浏览器jupyter notebook安装拓展jupyter notebook汉化,现在分享给大家,希望可以做个参考。

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,添加下面语句:

复制代码
1
2
3
4
5
# 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输入如下语句:

复制代码
1
2
3
4
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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(52)

评论列表共有 0 条评论

立即
投稿
返回
顶部