gpt4 book ai didi

python - Anaconda 运行时错误 : Python is not installed as a framework?

转载 作者:IT老高 更新时间:2023-10-28 21:58:50 25 4
gpt4 key购买 nike

我已经使用 pkg 安装程序安装了 Anaconda:

Python 2.7.10 |Continuum Analytics, Inc.| (default, May 28 2015, 17:04:42) 
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org

但是当我尝试使用 matplotlib 中的任何东西时,即:

 from matplotlib import pyplot as plt

我明白了

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.

我真的不确定这意味着什么,或者如何解决它。

最佳答案

因为我刚遇到这个问题而发帖,这是一个快速修复:

如果你使用 pip 安装:

  1. 创建~/.matplotlib/matplotlibrc

  2. 将“backend: TkAgg”(不带引号)添加到文件中。

关于python - Anaconda 运行时错误 : Python is not installed as a framework?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31373163/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com