[SciPy-user] PIL and scipy conflicting

Jon Peirce Jonathan.Peirce at nottingham.ac.uk
Wed Feb 11 17:55:09 CST 2004

Hi all

I have scipy (0.2.0_alpha_212.4128) and PIL (1.1.4) installed on a winXP 
machine and I'm getting a strange conflict. If scipy is imported second 
(using a clean namespace) then Image can no longer 'open':

#this works fine
import scipy
import Image
im = Image.open('somefile.jpg')

#this returns error
import Image
import scipy
im = Image.open('somefile.jpg')

>   File "C:\Python23\lib\site-packages\PIL\Image.py", line 1571, in open
>     raise IOError("cannot identify image file")
> IOError: cannot identify image file

Does anyone know why? I don't want just to go with the former - its 
presumably doing some other damage to scipy that i haven't come across yet!

Jon Peirce
Nottingham University
+44 (0)115 8467176 (tel)
+44 (0)115 9515324 (fax)


More information about the SciPy-user mailing list