Comments on: Installing PIL on Djangostack 1.1.1/1.2/1.3 http://www.michelepasin.org/blog/2011/02/08/installing-pil-on-djangostack-1-1-1/ At the core of all well-founded belief lies belief that is unfounded - Wittgenstein Tue, 31 Jan 2012 11:27:42 +0000 hourly 1 https://wordpress.org/?v=5.2.11 By: mike http://www.michelepasin.org/blog/2011/02/08/installing-pil-on-djangostack-1-1-1/comment-page-1/#comment-194 Tue, 31 Jan 2012 11:27:42 +0000 http://www.michelepasin.org/blog/?p=1095#comment-194 Thanks Victoria, that’s highly informative and clear. When it comes to compiler issues and the like, I don’t really have a solid understanding of things so I end up opting for a trial-and-error approach… and I suppose that’s why I like djangostack: it lets me focus on the things I do know.
About the new DjangoStack: great news! definitely looking forward to try it out.

]]>
By: kaysa http://www.michelepasin.org/blog/2011/02/08/installing-pil-on-djangostack-1-1-1/comment-page-1/#comment-193 Tue, 31 Jan 2012 10:20:16 +0000 http://www.michelepasin.org/blog/?p=1095#comment-193 Hi,

Thanks for putting this article together. Here at BitNami we have followed these steps, to try and figure out how to avoid these issues when trying to install PIL to the BitNami users. I’d like to share a few comments:

* The problem: missing gcc compiler (Mac OS X 10.6)

The issue is not really that it is trying to use an older compiler. The problem is that some macros are not defined when compiling with the new compiler. As you mention, a possible solution is to use an old compiler.

* _imaging.so: mach-o, but wrong architecture (Mac OS X 10.7)

As the message states, the problem is the wrong architecture of the library. It is not related to a wrong compiler version but that by default the library has been compiled for a 64 bits architecture. The current version of Python in BitNami Django stack is 32 bits and therefore it requires the libraries to be compiled for that platform.

The error can be avoided by setting the ARCHFLAGS environment
variable before installing PIL.

export ARCHFLAGS=”-arch i386″

And then installing PIL from source (using python setup.py install, not with easy_install).

Also when you need to compile a module on top of the BitNami DjangoStack and you want to link it to the libraries included in the stack instead of the system libraries you should first load the BitNami environment. To do so execute the following:

. /scripts/setenv.sh <– notice the space between the dot and the path to the setenv.sh scripts.

In any case I'm glad of letting you know that we have released a new version of the BitNami DjangoStack that already includes PIL (only for Linux and Mac OS X) so the users don't need to workaround the installation. Thanks again for taking the time to write the guide, it made realize the issue and was a great help to fix it.

Best regards,

Victoria.

]]>
By: mike http://www.michelepasin.org/blog/2011/02/08/installing-pil-on-djangostack-1-1-1/comment-page-1/#comment-192 Wed, 28 Dec 2011 12:40:25 +0000 http://www.michelepasin.org/blog/?p=1095#comment-192 no problem – glad it helped!

]]>
By: Javier Muñoz http://www.michelepasin.org/blog/2011/02/08/installing-pil-on-djangostack-1-1-1/comment-page-1/#comment-191 Tue, 13 Dec 2011 09:03:35 +0000 http://www.michelepasin.org/blog/?p=1095#comment-191 Thanks, you’ve made my day!

Same problem with bitnami + lion + PIL. The trick also worked for me :)

]]>