这是我第一次设置matplotlib。 我使用的是OS X Lion 10.7(构建11A511s,因此没有对OS X Lion初始版本进行更新)。 我正在使用virtualenv和pip进行安装。 我知道与libpng 1.5不兼容,所以我没有直接运行“pip install matplotlib”... 相反... 我尝试从虚拟环境内运行以下命令:pip install -e git+https://github.com/matplotlib/matplotlib#egg=matplotlib-dev 看起来好像开始安装了,但是然后我得到了这个错误:
/Users/myusername/.virtualenvs/nltk/lib/python2.7/site-packages/numpy/core/include/numpy/
__multiarray_api.h:1532: warning: ‘int _import_array()’ defined but not used
lipo: can't open input file: /var/folders/wy/s1jr354d4xx7dk0lpdpbpsbc0000gn/T/
/ccfNUhyq.out (No such file or directory)
error: command 'llvm-gcc-4.2' failed with exit status 1
----------------------------------------
Command /Users/sameerfx/.virtualenvs/nltk/bin/python -c "import setuptools; __file__=
'/Users/sameerfx/.virtualenvs/nltk/src/matplotlib/setup.py'; exec(compile(open(__file__
).read().replace('\r\n', '\n'), __file__, 'exec'))" develop --no-deps failed with error code 1
Storing complete log in /Users/sameerfx/.pip/pip.log
$brew doctor
的建议,一旦警告得到解决,您的pip install -e git+https://github.com/matplotlib/matplotlib#egg=matplotlib-dev
就可以工作了。 - Milktraderpip
安装matplotlib是可行的。 - SethMMorton