我已经成功地在我的macbook上为python 3安装了枕头。但我还是不能用PIL库。我又试着卸载和安装它。我也尝试过没有import Image的from PIL。不过,我没有安装PIL。上面写着
无法找到满足PIL要求的版本(来自版本:)
from PIL import Image
--------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-4-b7f01c2f8cfe> in <module>()
----> 1 from PIL import Image
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PIL/Image.py in <module>()
58 # Also note that Image.core is not a publicly documented interface,
59 # and should be considered private and subject to change.
---> 60 from . import _imaging as core
61 if PILLOW_VERSION != getattr(core, 'PILLOW_VERSION', None):
62 raise ImportError("The _imaging extension was built for another "
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PIL/_imaging.cpython-36m-darwin.so, 2): Symbol not found: _clock_gettime Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PIL/.dylibs/liblzma.5.dylib (which was built for Mac OS X 10.12) Expected in: /usr/lib/libSystem.B.dylib in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PIL/.dylibs/liblzma.5.dylib发布于 2018-05-04 20:58:28
如果使用Anaconda,可以尝试:
conda install Pillow因为这对我有用。
发布于 2018-05-04 21:26:16
https://stackoverflow.com/questions/50182828
复制相似问题