【10】报错-1-Mac运行sklearn的matplotlib问题

mac上在conda中配置的sklearn所需要的各种包,准备好好撸一下sklearn这个东东,

报错:

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. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.

解决办法:

vim ~/.matplotlib/matplotlibrc
然后输入以下内容:
backend: TkAgg

参考资料:

http://blog.csdn.net/patrick75/article/details/50885025

这里是一个广告位,,感兴趣的都可以发邮件聊聊:tiehan@sina.cn
个人公众号,比较懒,很少更新,可以在上面提问题,如果回复不及时,可发邮件给我: tiehan@sina.cn