Windows 7 ZLIB(PNG/ZIP)支持上的pil png activestate不可用 [英] pil png activestate on windows 7 ZLIB (PNG/ZIP) support not available

查看:125
本文介绍了Windows 7 ZLIB(PNG/ZIP)支持上的pil png activestate不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将python程序从OS X移植到Windows 7. 该程序使用tkinter处理png 例如

I'm trying to port a python program from OS X to Windows 7. This program processes a png with tkinter eg

self.logoImg = ImageTk.PhotoImage(Image.open('GrowthPathLogo.png'))

代码失败, IOError:解码器zip不可用

The code is failing with IOError: decoder zip not available

我尝试用pypm安装pip. 然后,我尝试使用pip构建它. 在构建过程结束时,它报告不支持png/zlib

I've tried installing pip with pypm. Then I try building it with pip. At the end of the build process it reports that there is no support for png/zlib

在Windows上安装python.org时出现相同的错误.

I get the same errors with the python.org installation on Windows.

我很困,而且我不擅长构建C库.我也不知道点子的工作原理.我安装了gnu zlib库,但完全没有帮助.我已经安装了Visual C ++ 2008 Express,并且至少可以正常工作,因为pip确实可以成功编译东西.

I'm stuck and I'm not skilled at building C libraries. Neither do I know how pip works. I have a gnu zlib library installed but it's not helping at all. I have Visual C++ 2008 Express installed, and at least that's working because pip does compile things successfully.

推荐答案

尝试构建这里,由克里斯托夫·高尔克(Christoph Gohlke)维护.要自己构建PIL,您需要自述文件中提到的几个库:libjpeg,zlib,freetype2和littleCMS.阅读 zlib125-dll.zip 中的USAGE.txt,以获得有关使用Visual C ++或MinGW链接到zlib的说明.

Try the build here that's maintained by Christoph Gohlke. To build PIL yourself you need several libraries as mentioned in the README: libjpeg, zlib, freetype2, and littleCMS. Read USAGE.txt in zlib125-dll.zip for instructions on linking to zlib with Visual C++ or MinGW.

这篇关于Windows 7 ZLIB(PNG/ZIP)支持上的pil png activestate不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆