PNG display in PIL broken on OS X Mavericks?

旧城冷巷雨未停 提交于 2019-12-05 21:22:26

I think your problem is that your PIL was built without PNG support, or with only partial PNG support, on your Mavericks machine.

If PIL can't find both libpng and libz where it wants to, you won't have complete PNG support. And after upgrading from Mountain Lion to Mavericks, this seems to sometimes be a problem.

This may not be the same problem you're having. For example, it could be down to Apple using a buggy version of Tcl/Tk again (as they infamously did in Snow Leopard). But it's definitely worth trying.

With Pillow, and some versions of old-school PIL (but really, if you're not using Pillow, you almost definitely should be), the end of the install process gives you a friendly "PIL SETUP SUMMARY" section that shows you all the important configuration stuff.

I had the exact same problem with Pillow 2.2.1 on a locally-built Python 3.3.2. I solved it by using Homebrew to install libpng, then rebuilding Pillow:

$ brew install libpng
$ pip-3.3 uninstall pillow
$ pip-3.3 install pillow

I was experiencing the same problem and I did the following. It seems to be fixed.

sudo unistall pillow
xcode-select --install
pip install pillow

It seems to be working great. I also installed all the items below, but it seems you have it already installed

brew install libtiff libjpeg libpng webp littlecms 

Did you install Pillow dependencies?

pip uninstall Pillow
brew install libtiff libjpeg webp littlecms
pip install Pillow

You will need HomeBrew to execute the brew command.

I installed Pillow from homebrew (brew install Pillow), all necessary dependencies will be installed automatically. Problem solved.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!