Jupyter上无法保存md文件,报错:Unexpected error while saving file xxx/README.md display_priority.j2

Jupyter上无法保存md文件,报错:Unexpected error while saving file xxx/README.md display_priority.j2


重装了系统之后,安装了jupyter notebook无法保存.md文件,报了: Unexpected error while saving file xxx/README.md display_priority.j2的错误,在google上找了一堆解决方案都没解决,搜索 Unexpected error while saving file很多说是权限的问题,而搜索 jinja2.exceptions.TemplateNotFound: display_priority.j2又是html问题,templates没放在同一目录下,然而和我的问题不是很搭边, https://github.com/jupyter/nbconvert/issues/1369的解决方法有点类似,但是按照思路改还是没有解决,最后我看了下Terminal报错,如图所示:

在这里插入图片描述
从标亮出看到问题是jinja2.exceptions.TemplateNotFound: display_priority.j2,然后报错的文件在c:\programdata\anaconda3\envs\py37\share\jupyter\nbconvert\templates\compatibility\display_priority.tpl,点击去一看
在这里插入图片描述

注释上说这个template过时了,要用base/display_priority.j2,跟github上的解决方案有点类似,所以将这段话改成base/display_priority.j2
在这里插入图片描述
问题解决,jupyter可以正常保存md文件了
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_44424296/article/details/114446561