download sources (zip) from http://gnuwin32.sourceforge.net/packages/tiff.htm
2) zlib
download sources (zip) from http://gnuwin32.sourceforge.net/packages/zlib.htm
3) libjpg
download sources (zip) from http://gnuwin32.sourceforge.net/packages/jpeg.htm
http://www.wiredfool.com/2005/10/29/how-to-build-the-python-imaging-library-for-windows/
http://boodebr.org/main/python/build-windows-extensions
Installation of Python Image Library (PIL)
It will be a problems with PIL installation on Windows 7 64 bit, so you will need to install library from source code:
- Download PIL library source code from http://www.pythonware.com/products/pil/
- Unpack it to any folder, for example C:\PIL
- Run in command prompt (cmd):
cd c:\PIL
python setup.py install
This will install library, but without support for TKINTER, JPEG, ZLIB (PNG/ZIP) and FREETYPE2 (i.e. actually without anything
)
So let’s add support for at least JPEG and PNG. To do this, you will need to download following libraries:
- libtiff – download sources (zip) from http://gnuwin32.sourceforge.net/packages/tiff.htm
- zlib – download sources (zip) from http://gnuwin32.sourceforge.net/packages/zlib.htm
- libjpg – download sources (zip) from http://gnuwin32.sourceforge.net/packages/jpeg.htm
Following blog posts will help you to continue with installation:
Notes:
- Possible that you will need to remove
include
from some *.h source files as this needed to be included only on Unix (ok, at least not on Windows)
For example you will need to delete such line from zconf.h in zlib sources before try to run nmake for zlib.
- Don’t forget to set PIL library pointers (in setup.py of PIL) to point to the locations where you put zlib, libjpg and libtiff. If you forget to setup - PIL will not found them and you will get what I describe in the beging of post – I.e. nothing
.
This is for example what you need to set for zlib in setup.py of PIL in case if you copy zlib sources to c:\PIL\zlib folder (I assume that you unzip PIL into c:\PIL here):
ZLIB_ROOT = './zlib'
-
You also can found yourself with finding all the 32-bit times “__time32_t” and changing it to “time_t” for 64-bit conversion