在Ubuntu virtualenv上pip安装Pillow的错误

前端之家收集整理的这篇文章主要介绍了在Ubuntu virtualenv上pip安装Pillow的错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个ec2实例和Pillow 2.0安装在我的virtualenv最初。
不知何故,当我试图升级到枕头2.5,它失败了以下消息。即使我在重新安装之前完全取出枕头,错误也是一样的。 (所以现在我没有枕头在我的virtualenv)
$ pip install Pillow
....
....
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -fPIC -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/usr/include/freetype2 -I/home/andycheng/realprice/env/build/pillow/libImaging -I/home/andycheng/realprice/env/include -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 libImaging/RawDecode.c -o build/temp.linux-x86_64-2.7/libImaging/RawDecode.o

gcc: error: unrecognized option ‘-Qunused-arguments’

gcc: error: unrecognized option ‘-Qunused-arguments’

....
....
gcc: error: build/temp.linux-x86_64-2.7/libImaging/XbmEncode.o: No such file or directory

gcc: error: build/temp.linux-x86_64-2.7/libImaging/ZipDecode.o: No such file or directory

gcc: error: build/temp.linux-x86_64-2.7/libImaging/ZipEncode.o: No such file or directory

gcc: error: build/temp.linux-x86_64-2.7/libImaging/TiffDecode.o: No such file or directory

gcc: error: build/temp.linux-x86_64-2.7/libImaging/Incremental.o: No such file or directory

gcc: error: build/temp.linux-x86_64-2.7/libImaging/Jpeg2KDecode.o: No such file or directory

gcc: error: build/temp.linux-x86_64-2.7/libImaging/Jpeg2KEncode.o: No such file or directory

gcc: error: unrecognized option ‘-Qunused-arguments’

gcc: error: unrecognized option ‘-Qunused-arguments’

error: command 'gcc' Failed with exit status 1

----------------------------------------
Cleaning up...
Command /home/andycheng/realprice/env/bin/python -c "import setuptools,tokenize;__file__='/home/andycheng/realprice/env/build/Pillow/setup.py';exec(compile(getattr(tokenize,'open',open)(__file__).read().replace('\r\n','\n'),__file__,'exec'))" install --record /tmp/pip-U8jA_X-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/andycheng/realprice/env/include/site/python2.7 Failed with error code 1 in /home/andycheng/realprice/env/build/Pillow

我不知道这是否相关,但有很多gcc:错误:build / temp.linux-x86_64-2.7 / _imaging.o:日志中没有这样的文件或目录错误。还有很多gcc:error:unrecognized option’-Qunused-arguments’too。

我可以安装Pillow 2.5与我的根访问,但后来它不会安装在我的virtualenv。

sudo pip install Pillow  # this works but wrong directory
pip install -I Pillow==2.0  # gives the same error and would not install

版本

PIP:1.5.4

Linux:Ubuntu 12.04.4 LTS(所有包升级)

谢谢

我的情况略有不同,因为我的ubuntu 15.04也缺少libjpeg,所以安装失败每次。显然有时枕头找不到所需的库,最简单的方法解决它是安装dev版本,并链接用户libs。
sudo apt-get install python-dev
sudo apt-get install libjpeg8-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib

pip install pillow

部分解决方案找到here

猜你在找的Ubuntu相关文章