【发布时间】:2012-04-07 10:06:40
【问题描述】:
我正在尝试在新的 virtualenv 中安装 matplotlib。
当我这样做时:
pip install matplotlib
或
pip install http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0/matplotlib-1.1.0.tar.gz
我收到此错误:
building 'matplotlib._png' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -fPIC - DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/usr/local/include -I/usr/include -I. -I/home/sam/django-projects/datazone/local/lib/python2.7/site-packages/numpy/core/include -I. -I/usr/include/python2.7 -c src/_png.cpp -o build/temp.linux-x86_64-2.7/src/_png.o
src/_png.cpp:10:20: fatal error: png.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
有人知道发生了什么吗?
非常感谢任何帮助。
【问题讨论】:
-
您可能还会看到
The following required packages can not be built: freetype, png,这与(我认为)较新版本的pip中的错误相同。
标签: python matplotlib pip virtualenv