import Image
imageFile = "C:\Users\Abhi\Desktop\cbir-p\images.jpg"
im1 = Image.open(imageFile)
Error:
File "C:\Users\Abhi\Desktop\cbir-p\im1.py", line 5, in <module>
im1 = Image.open(imageFile)
File "C:\Python27\lib\site-packages\PIL\Image.py", line 2025, in open
raise IOError("cannot identify image file")
IOError: cannot identify image file帮助我,我已经安装了所有必要的软件包PIL,枕头,Opencv等。
发布于 2014-02-20 08:46:19
嘿不是因为你的文件路径问题..。
这是为您丢失的JPEG支持在您的PIL这里是我的解决方案在这里解释。https://apple.stackexchange.com/questions/59718/python-imaging-library-pil-decoder-jpeg-not-available-how-to-fix
转到这里下载lib libjpeg包。或者只是
brew install libjpeg

https://stackoverflow.com/questions/21899622
复制相似问题