python - cent 6.5使用pip安装pillow总是失败
阿神
阿神 2017-04-17 13:41:24
[Python讨论组]
python:2.7.8
阿里云cent os32位
virtualenv
virtualenvwrapper

之前有一个virtualenv不知道怎么回事成功装上了pillow
之后再在别的virtualenv装就全都报错
这是为什么 太奇怪了?下载whl安装,不管哪个版本都说不支持这个系统。

    imaging.c:3356: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.?.token

_imaging.c:3359: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.?.token

_imaging.c:3360: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.?.token

_imaging.c:3361: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.?.token

_imaging.c:3362: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.?.token

_imaging.c:3363: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.?.token

_imaging.c:3364: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.?.token

_imaging.c:3365: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.?.token

_imaging.c:3366: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.?.token

_imaging.c:3367: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.?.token

_imaging.c:3382: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.?.token

_imaging.c:3385: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.?.token

_imaging.c:3387: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.?.token

_imaging.c:3388: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.?.token

_imaging.c:3390: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.unctions?

_imaging.c:3497: error: expected ?.?.before ?.?.token

_imaging.c:3570: error: expected ?.?. ?.?. ?.?. ?.sm?.or ?._attribute__?.before ?.nit_imaging?

error: command 'gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /root/.virtualenvs/ts/bin/python -c "import setuptools, tokenize;__file__='/root/.virtualenvs/ts/build/pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-U7RYEY-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/.virtualenvs/ts/include/site/python2.7 failed with error code 1 in /root/.virtualenvs/ts/build/pillow
Traceback (most recent call last):
  File "/root/.virtualenvs/ts/bin/pip", line 11, in <module>
    sys.exit(main())
  File "/root/.virtualenvs/ts/lib/python2.7/site-packages/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/root/.virtualenvs/ts/lib/python2.7/site-packages/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 112: ordinal not in range(128)
阿神
阿神

闭关修行中......

全部回复(1)
ringa_lee

目测你需要安装 python-dev用来编译一些 c 写的 python

pil 或者 pillow 想要正常工作,可能还需要 libjpeg-dev libpng-dev等依赖库

先安装依赖库,再重新安装 pillow 库。如果在线 pip 不能安装,可以使用离线的方式安装,下载pillow
源码,然后用 pip 安装 :pip install pillow--2.3.tar.gz

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号