打开文件D:\software\Anaconda3\pkgs\notebook-6.0.1-py37_0\Lib\site-packages\notebook\static\style\style.min.css
找到如下代码:
添加font-family
属性:
.CodeMirror-lines {
/* In CM2, this used to be 0.4em, but in CM3 it went to 4px. We need the em value because */
/* we have set a different line-height and want this to scale with that. */
/* Note that this should set vertical padding only, since CodeMirror assumes
that horizontal padding will be set on CodeMirror pre */
font-family: Source Code Pro,DejaVu Sans Mono,Ubuntu Mono,Anonymous Pro,Droid Sans Mono,Menlo,Monaco,Consolas,Inconsolata,Courier,monospace,PingFang SC,Microsoft YaHei,sans-serif;
padding: 0.4em 0;
}
重新刷新jupyter notebook页面即可。