首页 > 解决方案 > 在 django 和解码器 jpeg 中上传图像不可用

问题描述

我正在尝试在我的旧 django (1.0.4) 项目中上传图片。它以前可以工作,但现在我收到错误 500。

以下是回溯的一部分:

IOError at /gallery
decoder jpeg not available
Request Method: GET
Request URL:    http://myproject.com/gallery
Exception Type: IOError
Exception Value:    
decoder jpeg not available

我已经安装(处理图像):

我也升级了 - 枕头和 pil:

pip install Pillow==2.6.1 --upgrade
Requirement already up-to-date: Pillow==2.6.1 in /usr/lib/python2.7/dist-packages
Cleaning up...

pip install PIL==1.1.7 --upgrade
Could not find any downloads that satisfy the requirement PIL==1.1.7 in ./venv/lib/python2.7/site-packages/PIL
Downloading/unpacking PIL==1.1.7
Cleaning up...
No distributions at all found for PIL==1.1.7 in ./venv/lib/python2.7/site-packages/PIL

标签: pythondjangoimageuploadimage-uploading

解决方案


推荐阅读