Compiling PIL for Python 2.4

F

Fuzzyman

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
 
S

Stefan Behnel

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

Sorry, can't help you on the rest (which seems to be rather MS and
compiler specific), but in general: cross-posting is not a good idea. Read
any of the many copies of the Netiquette on this topic. In short,
submitting a cross-post reads as: you haven't actually thought about your
problem but want to bug as many people as possible with it.

Stefan
 
F

Fuzzyman

Hmmm... disagree. Not eevryone who has experience of compilation (even
compiling PIL) will be on the sig. The sifg is probably the 'right'
place - but my experience is that a lot of htem are very low traffic.

This is also a topic of general interest to many pythoners. See the
number of questions regarding configuring distutils recently.

Regards,

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

Fredrik Lundh

Stefan said:
Sorry, can't help you on the rest (which seems to be rather MS and compiler specific)

no, it's Python 2.4 specific. this is a python newsgroup.
In short, submitting a cross-post reads as: you haven't actually thought
about your problem but want to bug as many people as possible with it.

people who might have successfully compiled Python 2.4 extensions,
that is. they tend to visit this newsgroup from time to time.

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top