解决:Windows下jupyter notebook使用主题时出错解决方法
jupyter notebook更改自定义主题失败后解决方法
jupyter notebook非常的简洁大方,也便于使用。但是在原生界面使用了一星期之后,我只有一种感觉,就是亮瞎。。。被Windows环境下字体丑哭。。。
于是决定更改jupyter notebook的主题颜色和字体,百度一下各路大神写的成功文档,使用pip install jupyterthemes安装主题插件成功后,使用 jt -l查看主题选择,再键入jt -t 主题名后出现错误:UnicodeDecodeError: 'gbk' codec can't decode byte 0x8b in position 41271: illegal multibyte sequence。。。
不过人生在于折腾
第一步、修改stylefx.py
文件位置:Anaconda\envs\tensorflow\Lib\site-packages\jupyterthemes(参考自己安装目录)
使用jupyter notebook打开stylefx.py文件:
1.代码第60、290处添加 :encoding='utf-8'
第二步、修改lexer.py文件
文件地址:Anaconda\envs\tensorflow\Lib\site-packages\lesscpy\lessc(自行参考自己的安装目录)
使用jupyter notebook打开lexer.py文件
1.代码474处添加:encoding='utf-8'
第三步、更换主题
至此大功告成。