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

转载于:https://www.cnblogs.com/johnchain/p/3271427.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值