在Mac OS X Lion中安装MatplotLib [英] Installing MatplotLib in mac osx lion
问题描述
我试图在Mac OSX Lion中安装matplotlib.试图使用sourcefourge网站中的二进制文件,但出现此错误:"matplotlib需要安装System Python 2.7".
I was trying to install matplotlib in Mac OSX Lion. Tried to used the binary that is in the sourcefourge site, but I got this error: "matplotlib requires System Python 2.7 to install".
我去了终端,输入python --version并检查了需求.
I went to the Terminal and typed python --version and its check the requirements.
在此之后,我尝试使用pip,并且在执行此操作时é出现以下错误:
After this I tried to used the pip, and while doing so é got the following error:
"src/_image.cpp:908:错误:无效使用了不完整的类型'struct png_info_def'"
"src/_image.cpp:908: error: invalid use of incomplete type ‘struct png_info_def’"
能给我一些安装提示吗?
Can you give me clues in how to install it?
非常感谢.
我找到了一种方法,而不必安装新版本的python:
I found a way, without having to install a new version of python:
http://the.taoofmac.com/space/blog/2011/07/24/2222
推荐答案
您可以尝试使用官方" python发行版,苹果可能已经对提供的python发行版进行了调整.您可以在此处找到2.7: http://www.python.org/download/ 您可能还需要重新安装numpy后缀: http://sourceforge. net/projects/numpy/files/NumPy/1.6.1/
You can try with an "official" python distribution, apple might have tweaked the supplied one. You can find the 2.7 here: http://www.python.org/download/ You might have to re-install numpy as well afterwords: http://sourceforge.net/projects/numpy/files/NumPy/1.6.1/
我建议也安装scipy 让我知道它是否有效;)
I would suggest to install scipy as well Let me know if it works ;)
这篇关于在Mac OS X Lion中安装MatplotLib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!