mac 上input matplotlib 时报错:Python is not installed as a framework
import matplotlib.pyplot 的时候会报 Python is not installed as a framework 错误。
是因为mac os系统调用不了python所致。
解决方法:在matplotlib所在文件目录中新建名为matplotlibrc
的文件,内容为backend: TkAgg
实现方法:
1.后端输入 vim ~/.matplotlib/matplotlibrc 建立文件
2.输入:backend: TkAgg 回车