Mac matplotlib安装

来源:互联网 发布:网络机顶盒开机没反应 编辑:程序博客网 时间:2024/05/15 13:45

1. pip安装matplotlib

~(mypython): pip install matplotlib

2.创建文件matplotlibrc

~(mypython): touch ~/.matplotlib/matplotlibrc

3. 添加配置

~(mypython): vi ~/.matplotlib/matplotlibrc添加如下内容------------------------------backend: TkAgg------------------------------

4. 总结

没有第2和第3步骤,将报如下错误--------------------------------------**RuntimeError**: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework,  or try one of the other backends.----------------------------------
0 0
原创粉丝点击