alx*_*lxs 19 debian python pip
在 Debian 测试 (Jessie) 上,当我尝试在virtualenv
via 中安装 PIL 或 Pillow(python 成像库)时,出现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
Run Code Online (Sandbox Code Playgroud)
根据我使用 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
Run Code Online (Sandbox Code Playgroud)
似乎是实验版libc6
搞砸了,但我不知道出了什么问题。Aptitude 不会显示任何未满足的依赖项并且aptitude install -f
什么也不做。
另外,如果确实与 linux-headers 相关,那么我安装的那些是:
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
小智 28
在 Ubuntu 14.04 中尝试:
sudo ln -s /usr/include/freetype2 /usr/local/include/freetype
Run Code Online (Sandbox Code Playgroud)
Den*_*ker 23
您需要 python 开发头文件,可能还需要其他开发包。获得它们的最简单方法是:
sudo apt-get build-dep python-imaging
Run Code Online (Sandbox Code Playgroud)