您的位置:首页 > 编程语言 > PHP开发

Mac matplotlib安装

2016-06-06 11:10 666 查看

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.
----------------------------------
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  python