美文网首页
2019-12-24 Matplotlib错误

2019-12-24 Matplotlib错误

作者: Shalom小白 | 来源:发表于2019-12-24 21:34 被阅读0次

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.

解决方案:

from matplotlib import pyplot as plt

改为:

import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt

相关文章

网友评论

      本文标题:2019-12-24 Matplotlib错误

      本文链接:https://www.haomeiwen.com/subject/ogtqoctx.html