本文介绍了OSX枕头不兼容的库版本libtiff.5.dylib& libjpeg.8.dylib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试在任何脚本上使用Pilow时遇到此错误:
I've got this error while trying to use Pilow on 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
有人可以帮助我吗?
推荐答案
我遇到了同样的问题,我不得不重新安装枕头,而这一切都是依赖关系.我的某些符号链接不好.
I had the same problem and i had to reinstall pillow and all is dependencies. Some of my symlink where not good.
首先,您必须做到:
brew doctor
看看是否有一些错误.我的是这样的:
And see if you have some errors. Mine 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 clean all errors and dependencies i have installed:
brew uninstall pillow
brew uninstall libpng
brew uninstall libjpeg
brew uninstall webp
brew uninstall libtiff
brew uninstall littlecms
brew prune => to clean symlink
当我的酿酒医生没有任何错误时,我只需运行brew install pillow
,一切都可以正常工作.
When my brew doctor was without any errors i just run brew install pillow
and all was working fine.
希望有帮助.
这篇关于OSX枕头不兼容的库版本libtiff.5.dylib& libjpeg.8.dylib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!