Python PIL Errors
bradeyh at construx.com
Wed May 17 00:18:18 PDT 2000
Well, it was a real pain in the butt, but I got PIL (the Python Imaging
Library) to build under Mandrake 7. The steps that I should have taken are
as follows (the true path was much messier):
First, download and install the Python developer RPM,
Then, download and extract the PIL source files from Imaging-1.0.tar.gz, and
begin following the steps in the README file, with the following additions:
Step 3: Note that it doesn't really matter where you unpack the files to.
Step 6: Copy Setup.in to Setup, and edit Setup as follows:
- Change all instances of '/usr/local' to '/usr' (Mandrake paths)
- Add the line '-L/usr/X11R6/lib -lX11 \' before the JPEG library line
(I added it at line 34)--the trailing '\' is important.
This is apparently a 'known issue' at Pythonware, but it's not
documented anywhere but in the Image SIG archives at python.org.
If you don't add in the X11 lib, you'll get an
'undefined symbol: XFreePixmap' error when you try to
'import _imaging' later.
Step 7: Change '/usr/local' to '/usr' in Makefile.pre.in.
Step 9: Change '/usr/local' to '/usr' and 'Python1.5' to 'python1.5'
when running the commands. If the 'site-extensions' directory doesn't
exist, you'll have to create it. I also copied the FORMATS file over
to the PIL directory, since it looked useful.
It's possible to get PIL to build from a source RPM, or using the Python
tarball, but it's really, really, annoying. When I figured out what the
python-devel RPM was for, everything became much, much simpler. It's hinted
at in Step 2 of the PIL README, but never explicitly stated.
> -----Original Message-----
> From: Benjamin Honsinger [mailto:Honsinger at whs.wsd.wednet.edu]
> Sent: Tuesday, May 16, 2000 3:48 PM
> To: bradeyh at construx.com; linux at u.washington.edu
> Subject: Python PIL Errors
> I keep getting errors when I try to do step 7 of the PIL README file.
> [root at mandrake Imaging-1.0]# make -f Makefile.pre.in boot
> make: *** No rule to make target
> needed by `sedscript'. Stop.
> The PIL README file says this is caused by not building
> python from sources,
> so I tried to do that. I downloaded python 1.5.2 and
> attempted to install it,
> but I get this error.
> [root at mandrake Python-1.5.2]# make -C /usr/lib/ install
> make: *** No rule to make target `install'. Stop.
> make: Leaving directory `/usr/lib'
> It appears to be basically the same thing (No rule) as the
> PIL error. This is
> frustrating, I'm not getting much done. If you've got time, I
> would appreciate
> help. Thanks!
More information about the Linux