Cannot import matplotlib.pyplot in python 3

a 夏天 提交于 2019-12-08 09:42:26

Problem Cause In mac os image rendering back end of matplotlib (what-is-a-backend to render using the API of Cocoa by default). There is Qt4Agg and GTKAgg and as a back-end is not the default. Set the back end of macosx that is differ compare with other windows or linux os.

I resolve this issue following ways I assume you have installed the pip matplotlib, there is a directory in you root called ~ /. matplotlib. Create a file called matplotlibrc there and following code

~ / .matplotlib / Matplotlibrc
backend: TkAgg
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!