您的位置:首页 > 编程语言 > Python开发

win 7 下 PIL python Image模块 show函数不能正常显示图片

2013-07-26 22:48 761 查看
在 win 7 下使用 PIL 中的 Image 模块的 show() 函数时,报如下错:



该错误的解决方法很简单:

将 PIL 安装目录下的 ImageShow.py 文件的第 99 行:(我的 python 安装在 D:\Program Files\python 2.6,那 ImageShow.py  文件在:D:\Program Files\python 2.6\Lib\site-packages\PIL\ImageShow.py)

return "start /wait %s && del /f %s" % (file, file)


替换为:

return "start /wait %s && PING 127.0.0.1 -n 5 > NUL && del /f %s" % (file, file)
即可。

参考:

http://www.velocityreviews.com/forums/t707158-python-pil-and-vista-windows-7-show-not-working.html

博主所有文章已转自私人博客 Joe
的个人博客,谢谢关注!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Python 图片
相关文章推荐