I was trying to build Fisherfaces(https://github.com/bytefish/facerec) on my Mac(OS X 10.12.6), and I successfully built its dependencies including sklearn, numpy, scipy, matplotlib except Pillow.
So I tried :
pip3 install Pillow
at first I failed out of some network issue, so I tried again, and at last, I get this from terminal:
Installing collected packages: pillow
Successfully installed pillow-5.0.0
but then I tried on terminal:
TreaserdeMacBook-Pro:scripts treasersmac$ python3
Python 3.6.0 (v3.6.0:41df79263a11, Dec 22 2016, 17:23:13)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import PIL
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PIL'
and when I use python instead of python3, still get the same question.
Then I check the pip3 list:
TreaserdeMacBook-Pro:scripts treasersmac$ pip3 list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
cycler (0.10.0)
Django (2.0.1)
image (1.5.17)
matplotlib (2.0.0)
nose (1.3.7)
numpy (1.12.0)
Pillow (5.0.0)
pip (9.0.1)
pygal (1.7.0)
pyparsing (2.1.10)
python-dateutil (2.6.0)
pytz (2016.10)
requests (2.13.0)
scikit-learn (0.19.1)
setuptools (36.5.0)
six (1.10.0)
wheel (0.30.0)
seemed OK.
Then I checked path:
>>> import sys
>>> print(sys.path)
['', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload', '/Users/treasersmac/Library/Python/3.6/lib/python/site-packages', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages']
and PIL or Pillow was in: /usr/local/lib/python3.6/site-packages
but:
TreaserdeMacBook-Pro:scripts treasersmac$ cd /usr/local/lib/python3.6/site-packages
TreaserdeMacBook-Pro:site-packages treasersmac$ ls
Django-2.0.1.dist-info numpy-1.13.3-py3.6.egg-info
PIL pip
Pillow-5.0.0.dist-info pip-9.0.1-py3.6.egg-info
__pycache__ pkg_resources
cv2.cpython-36m-darwin.so scikit_learn-0.19.1.dist-info
django setuptools
easy_install.py setuptools-36.5.0-py3.6.egg-info
homebrew-numpy-nose.pth sitecustomize.py
image sklearn
image-1.5.17.dist-info wheel
numpy wheel-0.30.0-py3.6.egg-info
I can import sklearn and sklearn can not be found in sys.path printed before.
I searched StackOverFlow but only to find that questions raised about PIL or Pillow were almost years ago, and not the same situation as mine. (I think I used pip3 successfully installed Pillow..)
I'm new here, and urging for an answer...