python - Pillow virtualenv 安装失败 : "command ' gcc-4. 2' failed"

标签 python django gcc mezzanine python-imaging-library

我正在 virtualenv 中安装 gcc-4.2 failed with exit status 1Mezzanine 安装失败,并出现与 gcc-4.2 相关的错误,这是其中的摘录。我实际上可以在我的机器上成功安装它,但不能在 virtualenv 内。不过我想要它。我该怎么办?

`decode.c:465: error: ‘COMPRESSION_SGILOG’ undeclared (first use in this function)

decode.c:468: error: ‘COMPRESSION_SGILOG24’ undeclared (first use in this function)

decode.c:471: error: ‘COMPRESSION_CCITTRLEW’ undeclared (first use in this function)

In file included from decode.c:416:

libImaging/TiffDecode.h:10:20: error: tiffio.h: No such file or directory

libImaging/TiffDecode.h:13:18: error: tiff.h: No such file or directory

In file included from decode.c:416:

libImaging/TiffDecode.h:30: error: expected specifier-qualifier-list before     ‘tdata_t’

libImaging/TiffDecode.h:43: error: expected declaration specifiers or ‘...’ before ‘ttag_t’

decode.c: In function ‘PyImaging_LibTiffDecoderNew’:

decode.c:444: error: ‘COMPRESSION_CCITTRLE’ undeclared (first use in this function)

decode.c:444: error: (Each undeclared identifier is reported only once

decode.c:444: error: for each function it appears in.)

decode.c:447: error: ‘COMPRESSION_CCITTFAX3’ undeclared (first use in this function)

decode.c:450: error: ‘COMPRESSION_CCITTFAX4’ undeclared (first use in this function)

decode.c:453: error: ‘COMPRESSION_OJPEG’ undeclared (first use in this function)

decode.c:456: error: ‘COMPRESSION_ADOBE_DEFLATE’ undeclared (first use in this function)

decode.c:459: error: ‘COMPRESSION_THUNDERSCAN’ undeclared (first use in this function)

decode.c:462: error: ‘COMPRESSION_DEFLATE’ undeclared (first use in this function)

decode.c:465: error: ‘COMPRESSION_SGILOG’ undeclared (first use in this function)

decode.c:468: error: ‘COMPRESSION_SGILOG24’ undeclared (first use in this function)

decode.c:471: error: ‘COMPRESSION_CCITTRLEW’ undeclared (first use in this function)

lipo: can't figure out the architecture type of: /var/tmp//ccaRiavj.out

error: command 'gcc-4.2' failed with exit status 1

----------------------------------------
Command /Users/m/.virtualenvs/slinc/bin/python -c "import     setuptools;__file__='/Users/m/.virtualenvs/slinc/build/pillow/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-77NDIT-record/install-record.txt --single-version-externally-managed --install-headers /Users/m/.virtualenvs/slinc/bin/../include/site/python2.7 failed with error code 1 in /Users/m/.virtualenvs/slinc/build/pillow
Storing complete log in /Users/m/.pip/pip.log`

最佳答案

在你的 Linux 控制台中尝试一下,然后再试一次:

sudo apt-get install python-dev

关于python - Pillow virtualenv 安装失败 : "command ' gcc-4. 2' failed",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18950383/

相关文章:

python - 在网页上制作动画 map 的好工具

python - 属性错误: 'WSGIRequest' object has no attribute 'get' while making a get request

gcc - Stack Guard 和 Stack Smashing Protection - 金丝雀、内存

c - 如何管理模块特定的指针

python - 覆盖 Python 的 'in' 运算符?

python - Pandas excel 到 python 的长列

python - 有人可以帮我用刽子手吗?

python - 缩放追随者模型

python - 'utf- 8' can' t 解码位置 0 : invalid start byte 中的字节 0xc0

c++ - Windows Subsystem for Linux (WSL) 下的间歇性随机 'file not found' 错误