当我试图运行使用PIL的python程序时,我得到了以下错误。
Generate_Dot.py:14: RuntimeWarning: the frombuffer defaults may change in a future release; for portability, change the call to read:
frombuffer(mode, size, data, 'raw', mode, 0, 1)
img = Image.frombuffer('L', size, data)
Traceback (most recent cal
我有一个需要PIL的django应用程序,我一直收到错误,所以我决定在我的托管服务器上使用PIL。
PIL安装在我的虚拟环境中。然而,在运行下面的代码时,我得到了一个错误,并且当我在虚拟环境之外运行它时,它可以正常工作。
Python 2.7.3 (default, Apr 16 2012, 15:47:14)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more inf
我正在使用PIL通过virtualenv在ubuntu上安装了pip。我已经将setup.py文件更改为指向解码器、libaries。当我安装PIL时,我会收到以下消息:
`PIL 1.1.7 SETUP SUMMARY`
version 1.1.7
platform linux2 2.6.7 (r267:88850, Aug 11 2011, 12:16:10)
[GCC 4.6.1]
--- TKINTER support available
--- JPEG support available
--- ZLIB (PNG/ZIP) s
我已经安装了PIL。但我的django应用程序无法使用它。
django日志:
IOError at /catalogue/books/fiction/
decoder jpeg not available
然后我检查了有关PIL安装的pip日志。上面写着
version 1.1.7
platform linux2 2.7.3 (default, Mar 25 2013, 18:28:40)
[GCC 4.6.3]
-----------------------------------------------------------------
我在Django中找到了这段代码:
# Try to import PIL in either of the two ways it can end up installed.
try:
from PIL import ImageFile as PILImageFile
except ImportError:
import ImageFile as PILImageFile
直到最近,我还认为它无关紧要。然而,我在windows的虚拟环境下构建了PIL,突然之间
from PIL import Image
不再起作用了,我必须使用
import Image
所以,现在我想知道为
尝试将Django项目部署到Heroku上的一个新应用程序(代码在过去两年中运行在其他实例上)--并受到以下影响:
Downloading/unpacking PIL==1.1.7 (from -r requirements.txt (line 7))
Could not find any downloads that satisfy the requirement PIL==1.1.7 (from -r requirements.txt (line 7))
Some insecure and unverifiable files were ignored (use --
我有一个Django项目,它是在没有虚拟环境的情况下启动的。现在迁移到virtualenv和我以前创建的requirements.txt是巨大的,不能在虚拟环境中安装(许多错误如下所示)。如何生成所需包的最小列表?或者哪里有什么参考资料?
Could not find any downloads that satisfy the requirement PIL==1.1.7 (from -r requirements.txt (line 8))
Some externally hosted files were ignored (use --allow-external PIL to allo
我正在使用Windows7开发Django 1.3.7。现在我正在尝试使用pip在我的djangp上安装PIL,但是我得到了一个错误。
C:\Django-Proj\myproj\myproj>pip install PIL==1.1.7
Downloading/unpacking PIL==1.1.7
Could not find any downloads that satisfy the requirement PIL==1.1.7
Some externally hosted files were ignored (use --allow-external PIL to