[Solved] How to install PIL to Python 3.5 on a mac?

I am very new to Python installations and trying to install PIL. I have a feeling they are being installed to the wrong directory. PIP seems to have been installed fine.

Pycharm says

Try to run this command from the system terminal. Make sure that you
use the correct version of 'pip' installed for your Python interpreter
located at
'/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5'.

However when checking in terminal the reply is

Jamess-MacBook-Pro:~ JamesParsons$ pip install Pillow
Requirement already satisfied (use --upgrade to upgrade): Pillow in
/Library/Python/2.7/site-packages

Its also mentions a different version of Python.

How would the best way to install PIL be as Pycharm is coming up with unresolved reference still?

Solution #1:

On your command line:

$ which python

I’m betting that this returns:

/Library/Python/2.7/site-packages

This shows your ‘basic’ Python (which comes preinstalled on Mac) location. Now do:

$ which python3

If that shows this:

/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5′

Then check for a pip3 version:

$ which pip3

If that exists and has a similar location to python3, then try this:

$ pip3 install Pillow

If that works, there is a good chance PyCharm will now pick up the correct installation.

Respondent: Nathaniel Ford
The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Leave a Reply

Your email address will not be published.