我在py3.4下使用Django的imageField。 在我的Arch上运行正常,但是在服务器(centos)上运行时,报错为
To use ImageField, you need to install the Python Imaging Libraty.Get it at ...(url)
给出的网址是PIL的,但是只支持py2。
1. 为什么py3.4的Django需要去用一个py2的库呢? 而且用pip尝试安装这个库发现是不能兼容py3的
2. 该怎么解决这个问题?
在看了这里的答案后http://stackoverflow.com/questions/15080121/how-to-use-pillow-with-django,我尝试upgrade了Pillow,可以运行了。
看来Django确实使用了Pillow, 可惜错误信息误导了用户。