1

I've installed pillow for python 3 on my macbook successfully. But I still can't use PIL library. I tried uninstalling and installing it again. I've also tried import Image without from PIL as well. I do not have PIL installed, though. It says

Could not find a version that satisfies the requirement PIL (from versions: )

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
martineau
  • 119,623
  • 25
  • 170
  • 301
Mint.K
  • 849
  • 1
  • 11
  • 27
  • Did you install the module via pip or compiled the source yourself? It seems you maybe missing a dependency. – domochevski May 04 '18 at 20:52
  • I installed it via pip. – Mint.K May 04 '18 at 20:56
  • this is a possible duplicate of https://stackoverflow.com/questions/26720968/pil-importerror-the-imaging-extension-was-built-for-another-version-of-pillow –  May 04 '18 at 21:28

2 Answers2

1

If you use Anaconda, you may try:

conda install Pillow

because this works for me.

Muhammad Usman
  • 1,220
  • 13
  • 22
0

Pil is depricated and replaced by pillow. Pillow is the official fork of PIL

Install using pip or how you usually do it.

https://pillow.readthedocs.io/en/5.1.x/index.html

Svend Feldt
  • 758
  • 4
  • 17