如何在 Ubuntu 上安装 python 映像库 (PIL)?
我试着做
sudo apt-get install python-imaging
Run Code Online (Sandbox Code Playgroud)
但是现在当我运行 python selftest.py(我从http://pythonware.com/products/pil/网站上的某个地方获得的脚本)时,我得到(以及其他警告消息):
...
*** JPEG support not installed
*** ZLIB (PNG/ZIP) support not installed
...
*** 1 tests of 57 failed.
Run Code Online (Sandbox Code Playgroud)
我是否以某种方式弄乱了 PIL - 我该如何解决?
也许 PIL 就好了,但是“selftest.py”并不是用于检查 PIL 是否安装正确的正确程序——我还能如何判断 PIL 是否安装正确?
(我使用的是 Ubuntu 12.04 LTS“精确穿山甲”)。
(我最终想要做的是在一些 python 代码中添加一个二维条码生成器,我能找到的所有用 python 编写的二维条码生成器似乎都使用了 PIL)。
我对枕头很着迷。我已经在这里问了,没有解决:
Pillow 包的 Python Django Mezzanine 安装失败
我有 Ubuntu 14.04 和 python 2.7。
使用 pip 或从 github 安装枕头我有这个错误:
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/_imaging.o: File o directory non esistente
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/decode.o: File o directory non esistente
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/encode.o: File o directory non esistente
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/map.o: File o directory non esistente
x86_64-linux-gnu-gcc: error: build/temp.linux-x86_64-2.7/display.o: File o directory non esistente
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" …Run Code Online (Sandbox Code Playgroud)