python - 在 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
我已经安装(处理图像):
- 太平==1.1.7
- 枕头==2.6.1
我也升级了 - 枕头和 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
解决方案
推荐阅读
- unity3d - TrailRenderer 点击时的起点
- r - 如何用希伯来语阅读 R 中的 .doc 文件?
- php - 为不同的用户加载不同的数据库 - Laravel
- java - 收到错误“启动失败:类生成期间的一般错误:方法代码太大!”
- excel - VbA Worksheet_Change 无法识别单元格上的 DELETE 键
- mongodb - Mongoose 更新:增加一个计数器并在新日期重置为 0
- neural-network - 在 PyTorch 中实现 train 函数
- r - 使用 R 计算特定域区域的基因频率
- maven - Ubuntu 上的 NetBeans:项目的 pom.xml 文件包含无效的 xml 内容。请在继续之前修复文件
- java - 如何从整数、小数和指数部分重构数字?