4
我是新来的python,只是试图设置一切。我试过重新安装,但当我尝试“import matplotlib.pyplot as plt”时仍然出现错误,任何人都知道这意味着什么?import matplotlib.pyplot not working
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
import matplotlib.pyplot as plt
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pyplot.py", line 23, in <module>
from matplotlib.figure import Figure, figaspect
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/figure.py", line 16, in <module>
import artist
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/artist.py", line 6, in <module>
from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/transforms.py", line 34, in <module>
from matplotlib._path import affine_transform
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
谢谢!
您是如何安装matplotlib和python2.7 – Mark
感谢您的答复, 我从网上下载python.org一个.dmg(我使用OSX),然后maplotlib我第一次尝试的easy_install的.egg我已经从他们的网站下载,然后我尝试了一个不同的.egg,然后我尝试了一个.dmg(虽然我后来意识到.dmg是32位,我有64)。 因此,最后我卸载了包括python在内的所有东西,除了这次使用pip安装matplotlib之后,我又重新启动了,因为我没有安装xcode(没有gcc),所以现在我正在等待下载。 – iRoygbiv
哪个easy_install?是的,你需要Xcode的_path.so – Mark