修改 jupyter notebook
配置文件即可實現。
1.配置文件路徑
在 cmd
中查看 jupyter
的配置文件路徑,一般都是 .jupyter
的文件夾。
jupyter --config-dir
# C:\Users\Hider\.jupyter
2.打開文件
nbconfig/notebook.json
文件及路徑不存在時,自行創建。
3.添加配置
添加一下代碼,保存為 json
格式。
{
"MarkdownCell": {
"cm_config": {
"lineWrapping": true
}
},
"CodeCell": {
"cm_config": {
"lineWrapping": true
}
}
}
4.重啟 jupyter notebook
搞定!!!