Installing PIL with JPEG support on Mac OS X

后端 未结 7 545
南方客
南方客 2020-12-04 14:18

I posted a question before regarding this subject, and read other ones posted before, but none has successfully solved my problem.

I am trying to install PIL on Mac

相关标签:
7条回答
  • 2020-12-04 15:21

    I installed libjpeg and PIL on Snow and it was migrated without problems to Lion.

    I think however that you have the same problem I faced with installing libjpeg 7 on Snow. The solution for me was :

    • Make sure that you are NOT using GCC 4.0. That means those export lines in your .bash_profile file that you needed to get MySQLdb working now need to go away.
    • get (http://www.ijg.org/files/jpegsrc.v7.tar.gz) and do the usual ./configure && make && make install (or whatever the readme says).
    • Before installing PIL but after installing libjpeg, change the “JPEG_ROOT = None” line in my setup.py file to “JPEG_ROOT = libinclude(“/usr/local”)”

    I got this from a comment on this blog.

    Afterwards you can reinstall PIL through pip or easy_install. Make sure all the compiled stuff from your last run is deleted (sometimes you need to do this manually). I used virtualenv and pip.

    0 讨论(0)
提交回复
热议问题