0

I just downloaded scikit-image and I got an error message by simply trying to import the packages to run a tutorial example of the scikit website ("Gabor filter banks for texture classification"). See error message below.

I re-installed libtiff (using pip and homebrew) and Pillow (using conda), following the advice of some scikit-image developers. But the problem persists. I have the latest version of pillow installed (4.2.1), and I made sure to uninstall PIL before, and to build pillow from source to install all the dependencies.

ImportError                               Traceback (most recent call last)
<ipython-input-1-6205bd0cfb9d> in <module>()
      5 from scipy import ndimage as ndi
      6 
----> 7 from skimage import data
      8 from skimage.util import img_as_float
      9 from skimage.filters import gabor_kernel

/Applications/anaconda/lib/python2.7/site-packages/skimage/data/__init__.py in <module>()
     14 
     15 from .. import data_dir
---> 16 from ..io import imread, use_plugin
     17 from .._shared._warnings import expected_warnings
     18 from ._binary_blobs import binary_blobs

/Applications/anaconda/lib/python2.7/site-packages/skimage/io/__init__.py in <module>()
      5 """
      6 
----> 7 from .manage_plugins import *
      8 from .sift import *
      9 from .collection import *

/Applications/anaconda/lib/python2.7/site-packages/skimage/io/manage_plugins.py in <module>()
     26 from glob import glob
     27 
---> 28 from .collection import imread_collection_wrapper
     29 
     30 

/Applications/anaconda/lib/python2.7/site-packages/skimage/io/collection.py in <module>()
     10 import numpy as np
     11 import six
---> 12 from PIL import Image
     13 
     14 from ..external.tifffile import TiffFile

/Applications/anaconda/lib/python2.7/site-packages/PIL/Image.py in <module>()
     54     # Also note that Image.core is not a publicly documented interface,
     55     # and should be considered private and subject to change.
---> 56     from . import _imaging as core
     57     if PILLOW_VERSION != getattr(core, 'PILLOW_VERSION', None):
     58         raise ImportError("The _imaging extension was built for another "

ImportError: dlopen(/Applications/anaconda/lib/python2.7/site-
packages/PIL/_imaging.so, 2): Library not loaded: @rpath/libtiff.5.dylib
Referenced from: /Applications/anaconda/lib/python2.7/site-
packages/PIL/_imaging.so
Reason: Incompatible library version: _imaging.so requires version 8.0.0 or 
later, but libtiff.5.dylib provides version 7.0.0
halfer
  • 19,824
  • 17
  • 99
  • 186
Platkow
  • 1
  • 1
  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Jul 29 '17 at 11:28
  • This is not a scikit-image bug. Please re-install Anaconda. – Stefan van der Walt Aug 01 '17 at 23:16
  • I am not going to re-install Anaconda. It's too dramatic. I have been working with Numpy, Scipy, Scikit-Learn, Brian2 etc., and it works totally fine. What easy fix can I do? Thanks – Platkow Aug 02 '17 at 15:07
  • Do any of these answers help? https://stackoverflow.com/questions/22728468/osx-pillow-incompatible-library-version-libtiff-5-dylib-libjpeg-8-dylib – Juan Aug 17 '17 at 08:04
  • You should also create a new conda environment with Python 3.6 and work there. ;) – Juan Aug 17 '17 at 08:04

0 Answers0