OSX Pillow Incompatible library version libtiff.5.dylib & libjpeg.8.dylib

I have this error when trying to use Pilow for any scripts:

  File "/Users/antonio/WWW/myproj/myproj/functions.py", line 12, in <module>
    from PIL import Image, ImageOps
  File "/Library/Python/2.7/site-packages/PIL/Image.py", line 53, in <module>
    from PIL import _imaging as core
ImportError: dlopen(/Library/Python/2.7/site-packages/PIL/_imaging.so, 2): Library not loaded: /usr/local/lib/libjpeg.8.dylib
  Referenced from: /usr/local/lib/libtiff.5.dylib
  Reason: Incompatible library version: libtiff.5.dylib requires version 13.0.0 or later, but libjpeg.8.dylib provides version 9.0.0

Can anybody help me?

+4
source share
5 answers

I had the same problem, and I had to reinstall the pillow, and all this dependencies. Some of my symbolic links where not good.

First you need to do:

brew doctor

And see if you have some errors. My was like this:

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
/usr/local/lib/libjpeg.8.dylib
/usr/local/lib/libpng.3.dylib
/usr/local/lib/libpng12.0.dylib
/usr/local/lib/libpng14.14.dylib

Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .la files:
/usr/local/lib/libjpeg.la
/usr/local/lib/libpng12.la
/usr/local/lib/libpng14.la
/usr/local/lib/libpng15.la

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

 Unexpected .pc files:
/usr/local/lib/pkgconfig/libpng12.pc
/usr/local/lib/pkgconfig/libpng14.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
/usr/local/lib/libjpeg.a
/usr/local/lib/libpng12.a
/usr/local/lib/libpng14.a

So, I decided to clear all the errors and dependencies that I installed:

brew uninstall pillow
brew uninstall libpng
brew uninstall libjpeg
brew uninstall webp
brew uninstall libtiff
brew uninstall littlecms

brew prune => to clean symlink

When my brew doctor was error free, I just ran brew install pillowit and everything worked fine.

Hope this helps.

+5
source

conda try:

conda install libtiff

, , :

pip install --upgrade libtiff
+1

. Python Anaconda, "conda install Pillow .

0

OSX 10.10.2. anaconda python, Python 2.7.9 | Anaconda 2.2.0 (x86_64). Frank user4183543 , .

.

:

$ locate libtiff.5.dylib

/Users/curt/anaconda/lib/libtiff.5.dylib
/Users/curt/anaconda/pkgs/libtiff-4.0.2-1/lib/libtiff.5.dylib

libjpeg.8.dylib . libjpeg.8.dylib libtiff.5.dylib :

$ ln -s /Users/curt/anaconda/lib/libjpeg.8.dylib /usr/local/lib/libjpeg.8.dylib
$ ln -s /Users/curt/anaconda/lib/libtiff.5.dylib /usr/local/lib/libtiff.5.dylib

Pillow/PIL , , .

I am sure there is a better solution that identifies the underlying problem, but I am posting this in the interest of Conda users who may experience similar problems.

0
source

Try reinstalling the last pillow. I am using anaconda python and

conda install -f pillow

fix a similar problem for me.

-1
source

Source: https://habr.com/ru/post/1534003/


All Articles