例如运行下图所示的代码,没有图形出来。看jupyter的log,kernel已经凉了。。
试错:
全网找解决方案,jupyter、ipkernel什么的全都更新了,anaconda分配内存啥的全都试了一遍,没有作用。
解决方案:
最后我在stackoverflow上面找到了答案:
Kernel appears to have died - Jupyter notebook python matplotlib - Stack Overflow
I try the solution of this video, based on this post, and it worked for me:
-
Run Anaconda Prompt as administrator
-
conda install --yes freetype=2.10.4
我最开始freetype没有限定版本, conda install --yes freetype 还是报错。按照上面的限定了版本号为 2.10.4 就解决了。
Matplotlib依赖freetype库。