I’ve just managed to get Django up and running on Cygwin.
I have to say that getting PIL to build was a real pain in the neck (Python Imaging Library - required for ImageField). In the hope that I may save others from this pain, here is the solution.
You need to compile PIL from source so make sure you have gcc installed (in cygwin). There’s a handy installation helper in the cygwin setup package list called, ‘gcc: C compiler upgrade helper’. Install this, and it grabs the dependencies.
PIL Python Imaging Library
Get the PIL source from here, and unpack the archive to your sources folder (I use /home/rich/sources).
Now, if you run python setup.py install, the installation hangs (for me anyway). Googling reveals that this is not uncommon. What you need to do is ‘rebase’! Sound like a crack issue… maybe it is?
Here’s the magic command (and don’t ask me why this works):
rebase -b 0x1000000000 /bin/tk84.dll
So, close cygwin and open up task manager, kill any gcc.exe or python.exe processes that are hanging around. Next, run the above command. You should then be able to install using setup.py as normal.
python setup.py install
A big thank you to Ross Patterson for publicising this solution.
Installing PIL on Cygwin was published on Jetfar.com.
Thanks. This was a maddening problem
This worked for me (Imaging-1.1.6)
Wow!
Thanks, Richard! Interestingly, the package also compiled much faster after this
thank you!
Great fix man. Thanks heaps for that.
GREAT FIX.
THANK YOU SO MUCH.
Thanks very much. I’ve been struggling with these hanging installations for months, and your fix has got me back on track. Yay!
I was able to build the PIL using this fix, but it apparently broke the Tkinter. Now when I try running a tkinter application, i get this error:
File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 38, inimport _tkinter # If this fails your Python may not be configured for Tk
ImportError: Permission denied
Any help, please?
Rich: Sorry mate, I haven’t done any non-web work in years, let alone GUI. Good luck!