gpt4 book ai didi

python - OS X 上的 Matplotlib.pyplot 和来自 Python.org 的 64 位 Python

转载 作者:太空狗 更新时间:2023-10-29 20:29:41 25 4
gpt4 key购买 nike

我刚刚在我的 OS X 10.6.6 上安装了 numpymatplotlib。我有来自 Python.org 的 Python 2.7。当我执行 import matplotlib.pyplot 时,出现以下错误:

ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_path.so, 2): no suitable image found.  Did find:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_path.so: no matching architecture in universal wrapper

我错过了什么吗?我该如何解决这个问题?

更新 1(2011 年 3 月 25 日):
matplotlib 的交互式绘图系统使用 Tcl/Tk/Tkinter 提供 GUI。我安装了 64 位 Python,但我错过了 Python.org 下载页面中的以下警告 link1 , link2 : http://www.python.org/download/releases/2.7.1/
http://www.python.org/download/mac/tcltk/
因此,我deleted the 64-bit version并安装了 32 位版本。我建议保留这个问题,以防 Python 2.7 出现 64 位 Tcl/Tk/Tkinter。

最佳答案

如果您想要一个简单、开箱即用的解决方案:Enthought Python Distribution 7.0(64 位学​​术版)在 Mac OS X Leopard 上对我非常有用,包括 Python 2.7、numpy 和 matplotlib:https://www.enthought.com/products/epd.php

关于python - OS X 上的 Matplotlib.pyplot 和来自 Python.org 的 64 位 Python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5419439/

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