[Tutor] PIL import module problems
Danny Yoo
dyoo@hkn.eecs.berkeley.edu
Mon, 2 Sep 2002 15:25:44 -0700 (PDT)
On Tue, 3 Sep 2002, Thomi Richards wrote:
> I just downloaded the python imaging library module on my debian (sarge)
> box ('sudo apt-get install python2.2-imaging'). It installed OK, but
> when i go 'import Image', it says it cannot find the module "Image'.
> HOWEVER, i am using python2.1.
>
> can someone explain why the imaging library for 2.2 will not work with
> 2.1?? are there features in 2.2 which PIL needs?? I'll download the 2.1
> version, but i did find this a little interesting...
Hi Thomi,
The Python Imaging Library is a C extension module, and is tightly bound
to Python's dynamic library. As a result, C extension modules are really
dependent on the version of Python it's compiled against, and so
Python2.2-imaging package will only work with Python 2.2. So modules that
work with 2.1 need to be recompiled to work with 2.2.
(It's a bit of a hassle; I wonder if it's possible to make C extension
modules less version dependent!)
But anyway, since you're running Debian Linux, you should be able to do an
'apt-get install python2.1-imaging' command to get things running.
Good luck to you!