【Jupyter notebook】修改主题、修改工作路径



一、修改 Jupyter notebook 主题

安装主题

pip install --upgrade jupyterthemes

查看可用主题

jt -l

配置主题参数

主要设置参数是 :-t 设置主题 -f 代码字体 -fs 代码字号 -cellw(占屏比或宽度) -ofs(输出段的字号) -T==(显示工具栏)==等等。

本人的设置为:

C:\Users\35192>jt -t oceans16 -f consolamono -fs 11 -cellw 90% -ofs 10 -dfs 11 -T

效果展示

在这里插入图片描述

更多指令

cl options arg default
Usage help -h
List Themes -l
Theme Name to Install -t
Code Font -f
Code Font-Size -fs 11
Notebook Font -nf
Notebook Font Size -nfs 13
Text/MD Cell Font -tf
Text/MD Cell Fontsize -tfs 13
Pandas DF Fontsize -dfs 9
Output Area Fontsize -ofs 8.5
Mathjax Fontsize (%) -mathfs 100
Intro Page Margins -m auto
Cell Width -cellw 980
Line Height -lineh 170
Cursor Width -cursw 2
Cursor Color -cursc
Alt Prompt Layout -altp
Alt Markdown BG Color -altmd
Alt Output BG Color -altout
Style Vim NBExt* -vim
Toolbar Visible -T
Name & Logo Visible -N
Reset Default Theme -r
Force Default Fonts -dfonts

返回顶部


二、修改工作路径

默认配置中的打开路径在C盘的用户中,为了减少C盘的存耗,将其文档打开、存储路径修改。如下图所示是按照默认的路径代开后的示意图:
在这里插入图片描述
修改方法网上找介绍了好几种修改配置文件的,但是本人尝试了多次无效。就找了个简单的:右击jupyter notebook属性,在起始位置中添加你的合适路径:G:\Projects\Jupyter notebook,并将目标中的"%USERPROFILE%/"删除,如果不删除,启动时还将是默认的路径。
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

返回顶部


猜你喜欢

转载自blog.csdn.net/qq_45797116/article/details/113779680