Compiling PIL for Python 2.4

Fuzzyman fuzzyman at gmail.com
Mon Dec 13 03:30:27 EST 2004


I'll post this to the image-sig as well, but the audience is a bit
wider here.

I've just upgraded to Python 2.4. I've installed the free microsoft
optimising compiler and hacked distutils to use it - following the
instructiosn from http://www.vrplumber.com/programming/mstoolkit/ . It
works great and I've built a windows installer for PyCrypto 2.0.

I'm attempting to compile PIL for python 2.4. The build instructions
for windows say :

If you're using Python 2.0 or later, you can use the setup.py
script
to build the library.  The following commands should do the trick:

$ python setup.py build
$ python setup.py install

You may need to tweak the setup.py file somewhat in order to make
it
find certain external libraries; see comments in the file for
details.

Right - so you actually need to *get* the zlib and jpeg libraries,
which I've done. I've not yet got the right header/include files for
Tkinter, but it should work without them (just not build those files).
Except it bombs out :
C:\compile\Imaging-1.1.4\PIL>cd /D C:\compile\Imaging-1.1.4

C:\compile\Imaging-1.1.4>setup.py build
*** Cannot find Tcl/Tk headers and library files.
*** To build the Tkinter interface, set the TCLROOT
*** variable in the setup.py file.
running build
running build_py
running build_ext
building '_imaging' extension
C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\link.exe /DLL
/nologo /INCREMENTAL:NO /LIBPATH:libImaging /
LIBPATH:jpeg-6b /LIBPATH:zlib /LIBPATH:C:\Python24\libs
/LIBPATH:C:\Python24\PCBuild Imaging.lib jpeg.lib zlib.lib
kernel32.lib user32.lib gdi32.lib /EXPORT:init_imaging
build\temp.win32-2.4\Release\_imaging.obj build\temp.win32
-2.4\Release\decode.obj build\temp.win32-2.4\Release\encode.obj
build\temp.win32-2.4\Release\map.obj build\temp.wi
n32-2.4\Release\display.obj build\temp.win32-2.4\Release\outline.obj
build\temp.win32-2.4\Release\path.obj /OUT:bu
ild\lib.win32-2.4\_imaging.pyd
/IMPLIB:build\temp.win32-2.4\Release\_imaging.lib
LINK : fatal error LNK1181: cannot open input file 'Imaging.lib'
error: command '"C:\Program Files\Microsoft Visual C++ Toolkit
2003\bin\link.exe"' failed with exit status 1181

C:\compile\Imaging-1.1.4>



_imaging.obj is being created - but not linked. I can't find an
Imaging.lib file anywhere. Anyone got any clues for me ?

Regards,
Fuzzy
http://www.voidspace.org.uk/atlantibots/pythonutils.html




More information about the Python-list mailing list