django引入ImageField,报如下错误
django.core.exceptions.ImproperlyConfigured: Neither Pillow nor PIL could be imported: No module named Image
原因是pil 图像处理模块未安装,使用pip安装pip install pil
接着报错,悲催
Could not find any downloads that satisfy the requirement PILCleaning up...
Removing temporary dir /tmp/pip_build_root...
No distributions at all found for PIL
Storing debug log for failure in /root/.pip/pip.log
原因是 pip版本更新后的版本安全控制问题
命令换成:pip install PIL --allow-external PIL --allow-unverified PIL
error: command 'gcc' failed with exit status 1
yum install gcc python-devel