Install JPEG support libraries:

Download JPEG library source curl -O http://www.ijg.org/files/jpegsrc.v8c.tar.gz



Extract tar -xvzf jpegsrc.v8c.tar.gz



Switch to jpeg directory cd jpeg-8c



Run ./confgure (I only made it work at 'sh' command prompt someway)

(I only made it work at command prompt someway)

Run make



Run sudo make install

Install Freetype support:

Download Freetype library source curl -O http://ftp.igh.cnrs.fr/pub/nongnu/freetype/freetype-2.4.5.tar.gz



Extract tar -xvzf freetype-2.4.5.tar.gz



Enter to freetype directory cd freetype-2.4.5



Run ./confgure (I only made it work at 'sh' command prompt someway)

(I only made it work at command prompt someway)

Run make



Run sudo make install

Actually install PIL:

Type: sudo easy_install PIL



End!

Like lots of Apple fans around the world I've finally decided to upgrade my OS to Lion release. I have bought a new laptop and it was the case. I've waited for a weekend to prepared myself for sex. And it was it. Now I want to share my experience with you guys. For you not to spend to much time on those issues, I've did.Anyway what I'm usually using is a Fresh 2.7and many many minor tools which exceed scopes of this article. I also use Eclipse IDE for Python Dev. So all this I had to install and make spinning till monday.If anybody tells me that Macs do not have good tools for this. He will not be right. Maybe there some itches and scratches of head about:"Why is not those things working" or "Why do they work not as preferred". But there always is a good "Googled" decision to handle that.Anyway lets go to installing stuff.Short brief Plan of out work:Install Apple Development SDK + Xcode (free from Apple App Store).Install Python (from python.org/getit).Install Libraries needed for PIL (Libjpeg and Freetype support).Install Django.Mother of all Gods! We need Xcode and Mac Development tools provided from AppStore for Free. Let's download it and install it. If you have an apple store Account, of course. Actually here we do not need the whole bunch of stuff like Xcode or Dev tools except for GCC. And if you're advanced enough and have time to handle it... You should probably just install GCC, compiling it from sources for e.g. I'm not gonna spend time at those "low levels" and will simply install a set of packages that I may (or may not) need in future for dev.After Xcode is Downloaded you should go to Applications of Lunchpad and hit Xcode icon. (They are actually only downloaded not installed yet. What a long time period, waiting for 1,6 Gigs App download form App Store.) Hitand so on... Agree to everything and probably close some apps like for e.g. iTunes somewhat weirdly but true. Anyway lets continue to our next and main part. Those actions should already give us required GCC compiler for all our needs.We should get it from here, for e.g.: http://python.org/getit/ . I've chosen Python 2.7.2 Mac OS X 64-bit/32-bit x86-64/i386 Installer (for Mac OS X 10.6 and 10.7). It gave latest stable 2.7.2 Python with idle for about 17 Mb more downloading.DMG file has a simple enough installer that will ask you for root password and do all the stuff you need for you...3. Support of jpeg, freetype and littlecms is missing, by default. You need to compile PIL with support of at least jpeg and freetype. In order to make ImageField in your django project support jpeg formats and Have ability to handle Captcha fields or different text with picture manipulations.You may need to switch tointerpreter from standarttyping sh in command line. It handlesandcommends more gracefully (IMHO). And you may needto gain permissions to some system stuff here.Will try to be brief here:Now PIL Should compile with support of FreeType Fonts and LibJpeg. I also usedfirst. Because I simply like PIP more and it's much less to type. But it's a matter of taste... Anyway we must see something like this after PIL installs:This will indicate successful installation of PIL and components.is easy now. Jut do it whatever way you prefer. Likeoror even, if you prefer oldies. :)I prefer to usefor every app of mine... So I'm not even installing Django to main system path as well... Btw if you've used virtualenv with you projects, like I did, prepare yourself. They need to be recreated. So be sure to save them with. Maybe they will work if you pu them back to the same system path as they where... Buthere :).I'll try to cover installation of MySQL environment on a "clean" Lion install in my next articles.Anyway if you've found this article useful or think that I'm not right somewhere or even something less important... Feel free to drop me a comment here or contact me any available way. Thanks for reading so far and hope this will shorten your time while installing some things.