使用scrapy下载图片的时候,用PIL老是下载不成功
出现如下错误:
IOError: encoder jpeg not available
据说是安装PIL之前缺少一些相关的包
freetype freetype-devel libpng libpng-devel libjpeg libjpeg-devel
然而我
# pip uninstall PIL # yum install freetype freetype-devel libpng libpng-devel libjpeg libjpeg-devel
# pip install PIL
之后仍然提示
IOError: encoder jpeg not available
于是卸载PIL,安装pillow,测试成功
# pip uninstall PIL # pip install pillow