ImportError: No module named PIL


add at 2013/08/21 : 

试试PIL库
www.pythonware.com/products/pil/

【ps:只有32位的库】 

 

ImportError: No module named PIL

查到问题解决方案:

1:不通过 from PIL import Image 而直接 import Image

2:查看目录python安装目录 C:\Python27\Lib\site-packages下没有PIL目录,说明没安装PIL,通过命令 pip install pil,再次查看那个目录,出现了PIL,安装完成,收工。

 

执行命令pip install pil时,又遇到问题:error: Unable to find vcvarsall.bat

For Windows installations:

While running setup.py for package installations Python 2.7 searches for an installed Visual Studio 2008. You can trick Python to use a newer Visual Studio by setting the correct path in VS90COMNTOOLS environment variable before calling setup.py.

If you have Visual Studio 2010 installed, execute

SET VS90COMNTOOLS=%VS100COMNTOOLS%

or with Visual Studio 2012 installed

SET VS90COMNTOOLS=%VS110COMNTOOLS%

picked from :http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM