pip install PIL -E TICKETS-1-不支持JPEG/PNG [英] pip install PIL -E TICKETS-1 - No JPEG/PNG support

查看:74
本文介绍了pip install PIL -E TICKETS-1-不支持JPEG/PNG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的Django项目中使用Ubuntu和VitualEnv.

I'm using Ubuntu and VitualEnv for my Django project.

我使用Synaptic软件包管理器安装了PIL库,并且运行正常.但是,当我创建一个VitrualEnv并尝试使用pip安装PIL时,它会安装,但出现这种奇怪的行为:

I have PIL library installed using Synaptic Package Manager and it is working fine. But when I create an VitrualEnv and try to install PIL using pip it installes but I get this strange behaviour:

--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version       1.1.7
platform      linux2 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
              [GCC 4.5.2]
--------------------------------------------------------------------
*** TKINTER support not available
*** JPEG support not available
*** ZLIB (PNG/ZIP) support not available
*** FREETYPE2 support not available
*** LITTLECMS 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.

我希望我可以为所有依赖项使用requirements.txt,但是可能必须以某种方式手动安装PIL ...但是如何?

I was hoping that I can use requirements.txt for all my dependencies, but may be PIL have to be somehow manually installed ... but how?

谢谢约翰·凯斯,您是对的,我运行:

sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/

然后再次尝试安装PIL,我得到:

and after another try for PIL install I get:

--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version       1.1.7
platform      linux2 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
              [GCC 4.5.2]
--------------------------------------------------------------------
*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
*** LITTLECMS 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.

您可能需要安装libfreetype6-dev libjpeg8-dev

另一个不错的选择是使用枕头代替

Another good option is to use Pillow instead of PIL

推荐答案

ubuntu论坛上的线程涵盖了此内容话题.

This thread on ubuntu forums covers this topic.

这篇关于pip install PIL -E TICKETS-1-不支持JPEG/PNG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆