在Debian测试(杰西),当我尝试在安装PIL或枕头(Python图像库)virtualenv
通过pip
我得到以下错误:
running egg_info
writing Pillow.egg-info/PKG-INFO
writing top-level names to Pillow.egg-info/top_level.txt
writing dependency_links to Pillow.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'Pillow.egg-info/SOURCES.txt'
running build_ext
building 'PIL._imaging' extension
creating build/temp.linux-x86_64-2.7/libImaging
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -IlibImaging -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c _imaging.c -o build/temp.linux-x86_64-2.7/_imaging.o
_imaging.c:76:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
根据我对Wheezy的经验,我已经为Pillow安装了所有依赖项,但似乎测试有所不同。
有什么建议么?
编辑
实际上,我发现了libc6的另一个问题。我的版本来自实验。将其降级为测试版本后,我重新安装了所有依赖项,但是现在出现了另一个错误:
building 'PIL._imagingft' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/freetype2 -IlibImaging -I/usr/include/tcl8.5 -I/usr/local/include -I/usr/include -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu -c _imagingft.c -o build/temp.linux-x86_64-2.7/_imagingft.o
_imagingft.c:62:31: fatal error: freetype/fterrors.h: No such file or directory
#include <freetype/fterrors.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
似乎是libc6
搞乱了事情的实验版本,但我不知道出了什么问题。Aptitude不会显示任何未满足的依赖关系,并且aptitude install -f
不执行任何操作。
另外,如果确实与Linux标头相关,那么我安装的标头是:
linux-headers-3.11-2-all
linux-headers-3.11-2-all-amd64
linux-headers-3.11-2-amd64
linux-headers-3.11-2-common
linux-headers-3.2.0-4-amd64
linux-headers-3.2.0-4-common
linux-headers-amd64
您是否安装了内核头文件(错误似乎与某种原因有关)。
—
Braiam 2013年
Linux标头无关紧要,缺少的是python标头。
—
丹尼斯·考斯玛克