简体   繁体   中英

Can't get PIL to work on Mac OS X

I wanted to recompile PIL after having installed libjpeg because it threw the decoder jpeg not available whenever I tried importing JPEG images.

So, I've downloaded libjpeg , compiled it and installed it. Then I removed the ./build folder from PIL's source cache, and recompiled it (using sudo python setup.py install ).

Now the selftest.py thing is failing with *** The _imaging C module is not installed . I have no idea what the issue is.

  • There are no symbol errors.
  • The _imaging module is importable
  • All dylibs are loaded properly (according to -v )
  • The decoder error is still there.

Does anyone know what could be causing this? I'm on OS X Lion.

What would I try:

  • Remove old PIL and install new it from scratch (maybe it did not override properly).
  • If you missed something when compiling the libjpeg, like path specifications it will not find some of the libraries, so I recomend trying MacPorts py27-pil port for PIL installation, which will place all dependancies.

我解决了这个问题

pip install Pillow

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM