ImportError:[...]未加载库[...]原因:库版本不兼容

时间:2017-07-29 04:06:57

标签: pillow scikit-image libtiff

我刚刚下载了scikit-image,我只是尝试导入软件包以运行scikit网站("Gabor filter banks for texture classification")的教程示例时收到错误消息。请参阅下面的错误消息

我按照一些scikit-image开发人员的建议重新安装了libtiff(使用pip和homebrew)和Pillow(使用conda)。但问题仍然存在。我安装了最新版本的枕头(4.2.1),我确保在之前卸载PIL,并从源码构建枕头以安装所有依赖项。

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

0 个答案:

没有答案