If you installed Pillow with:
pip install pillow
then you can find where it is installed with:
pip show pillow
Sample Output
Name: Pillow
Version: 7.1.2
Summary: Python Imaging Library (Fork)
Home-page: https://python-pillow.org
Author: Alex Clark (PIL Fork Author)
Author-email: aclark@python-pillow.org
License: HPND
Location: /usr/local/lib/python3.7/site-packages <--- HERE
Of course, if you installed with:
pip3 install pillow
you will need:
pip3 show pillow
Now go to your Python interpreter and check where it is looking for packages and you will surely work out the problem:
python3 -c "import sys; print(sys.path)" | tr , '\n'
Samnple output
[
'/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python36.zip'
'/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6'
'/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload'
'/usr/local/lib/python3.6/site-packages'
'/usr/local/Cellar/numpy/1.13.3/libexec/nose/lib/python3.6/site-packages']
Of course, if you start Python with python
rather than python3
, you will need:
python -c "import sys; print(sys.path)" | tr , '\n'
Finally, go to your Terminal and find out what your shell actually runs when you enter python
by running:
type python # or "type python3" if you normally enter "python3"
Now go in your IDE and see which Python that runs:
import sys
print(sys.executable)