python-pillow / Pillow

Python Imaging Library (Fork)
https://python-pillow.org
Other
12.14k stars 2.21k forks source link

Pillow ImportError #543

Closed Toadman30 closed 10 years ago

Toadman30 commented 10 years ago

I've gotten Pillow to install using pip install Pillow, but I get this error when trying to import it. I'm on OSX 10.7.5

Traceback (most recent call last): File "<pyshell#0>", line 1, in from PIL import Image File "/Library/Python/2.7/site-packages/PIL/Image.py", line 53, in from PIL import _imaging as core ImportError: dlopen(/Library/Python/2.7/site-packages/PIL/_imaging.so, 2): Symbol not found: _jpeg_resync_to_restart Referenced from: /Library/Python/2.7/site-packages/PIL/_imaging.so Expected in: flat namespace in /Library/Python/2.7/site-packages/PIL/_imaging.so

Does anyone know what this means?

aclark4life commented 10 years ago

I'll guess maybe you have PIL installed too

Toadman30 commented 10 years ago

Ok how can I check it?

adamjforster commented 10 years ago

@Toadman30 If you have PIL installed you should be able to see it in the output of this command:

$ pip list
...
PIL (1.1.6)
...
aclark4life commented 10 years ago

Or additionally maybe try pillowfight which aims to do the right thing in the case of existing PIL installations (if I understand correctly): https://pypi.python.org/pypi/pillowfight

Toadman30 commented 10 years ago

Ok so I checked to see if PIL was installed too, but I only have Pillow is installed. I'm not sure what to try now.

linzhi commented 7 years ago

I have this question too....

Traceback (most recent call last): File "videotogif.py", line 8, in from PIL import Image File "/home/work/.jumbo/lib/python2.7/site-packages/PIL/Image.py", line 67, in from PIL import _imaging as core ImportError: /home/work/.jumbo/lib/python2.7/site-packages/PIL/_imaging.so: undefined symbol: TIFFSetWarningHandlerExt

hugovk commented 7 years ago

@linzhi Make sure you have Pillow installed and not PIL. If you have both, uninstall both then install only Pillow.

wiredfool commented 7 years ago

That error sounds like you've got a version of Pillow that's compiled against libtiff (but not a manylinux wheel), but the libtiff libraries aren't installed on the machine you're running it on.