python - pkg_resources.DistributionNotFound : PIL

标签 python linux django

我正在尝试使用 reviewcode python/django 的 git 存储库。 安装时

easy_install ReviewBoard

我收到以下错误

Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1.

安装 PIL 依赖项时发生此错误。我使用

手动安装

pip install PIL

安装成功

但是在创建网站时:

sudo rb-site install /var/www/reviewboard

但是现在遇到了恼人的错误:

pkg_resources.DistributionNotFound: PIL

任何线索,如何解决这个问题?

更新

PIL SETUP SUMMARY
--------------------------------------------------------------------
version      Pillow 2.3.0
platform     linux2 2.7.5+ (default, Sep 19 2013, 13:48:49)
             [GCC 4.8.1]
--------------------------------------------------------------------
*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
*** LIBTIFF support not available
--- FREETYPE2 support available
*** LITTLECMS2 support not available
*** WEBP support not available
*** WEBPMUX support not available
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.

To check the build, run the selftest.py script.

changing mode of build/scripts-2.7/pilprint.py from 644 to 755
changing mode of build/scripts-2.7/pilconvert.py from 644 to 755
changing mode of build/scripts-2.7/pilfont.py from 644 to 755
changing mode of build/scripts-2.7/pilfile.py from 644 to 755
changing mode of build/scripts-2.7/pildriver.py from 644 to 755
changing mode of /home/naveen/ENV/ly-subs/bin/pilprint.py to 755
changing mode of /home/naveen/ENV/ly-subs/bin/pilconvert.py to 755
changing mode of /home/naveen/ENV/ly-subs/bin/pilfont.py to 755
changing mode of /home/naveen/ENV/ly-subs/bin/pilfile.py to 755
changing mode of /home/naveen/ENV/ly-subs/bin/pildriver.py to 755

最佳答案

Python 1.6 release notes 中所述:

Pillow is now the preferred image manipulation library to use with Django. PIL is pending deprecation (support to be removed in Django 1.8). To upgrade, you should first uninstall PIL, then install Pillow.

关于python - pkg_resources.DistributionNotFound : PIL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21044615/

相关文章:

python - 在 python 脚本中检查正在运行的 python 脚本

python - 如何防止 nose 导入 __init__.py 文件?

linux - 如何控制 Shell 脚本的输入?

linux - 使用 autotools 在替换文件中执行替换

python - Django 表单,未提交表单

windows - Python 事件

php - 每个操作系统的 MPDF 文件大小不同

python - 扩展表单字段以添加新的验证

django - 序列化ManyToMany字段Drf干草堆

python - pandas 中多索引数据帧的累积百分比