错误:
ImportError: 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.
解决:
方法一:
import matplotlib as mpl
mpl.use('TkAgg')
import matplotlib.pyplot as plt
方法二:
https://stackoverflow.com/questions/21784641/installation-issue-with-matplotlib-python
解决MacOSX上Matplotlib错误
本文解决了在MacOSX环境下使用Matplotlib时遇到的框架安装错误,提供了两种有效解决方案,一是通过调整matplotlib的后端设置,二是参考StackOverflow上的详细安装指南。
1136

被折叠的 条评论
为什么被折叠?



