top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to install PIL or PILLOW on OS X Yosemite?

+1 vote
638 views

I just upgraded my Mac Mini to Yosemite and have never dabbled in Python on this OS. I see it has Python 2.7.6 installed.

When I do something like

from PIL import ImageFont, ImageDraw

it tells me that it cannot find PIL, How do I install this on Yosemite?

Any suggestions?

posted Feb 15, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

I would say stick with Pillow which is the current, maintained fork of the venerable PIL. Decide whether you want to use Python 3 or Python 2.

PIL/Pillow installation on OS X is more involved than on some other platforms because it depends on a number of third-party C libraries that are not shipped by Apple in OS X so you need to find another source for them. Rather than trying to build and install everything yourself or downloading a Pillow or PIL installer, I suggest picking one of the several fine distributors of open source packages for OS X and installing everything you need from them (including an up-to-date Python 2 or 3) and for your future needs beyond Pillow; options include Homebrew, MacPorts, Anaconda, Fink, and others. Once you've installed the base framework for the package manager you choose, installing something like Pillow and all of its dependencies is often just a one-line command. It may take a little while to get used to the quirks of the package manager you choose but, if you are going to use OS X for development with Python or many other languages, that time spent will be repaid many times over.

answer Feb 16, 2015 by Seema Siddique
Similar Questions
+2 votes

I have a host that has no access to the internet and I need to install PIL on it. I have an identical host that is on the internet and I have installed it there (with pip).

Is there a way I can copy files from the connected host to a flash drive and then copy them to the unconnected host and have PIL working there? Which files would I copy for that?

This is on CentOS 6.5, python 2.7

+1 vote

I want to write my own Screenshot Taking program in Python for Mac OS X.

Example : Whenever Command + Shift + 3 is pressed ==> whatever is there on the screen, should be grabbed / captured, and should be stored on my local with my own desired path, and name should automatically given as SnapshotX.. as in Snapshot1, Snapshot2, etc...

The same goes with Command + Shift + 4 ==> the only difference is that, it allows you to select a particular area to be captured / grabbed.

Command + Shift + 5 ==> This one is a little bit tricky which I am looking for. This shortcut doesn't exist. I want to create one of my own, where it would grab the entire webpage's screenshot which I am currently working on, and store the name as the webpage's link.

+4 votes

I am getting the following error -

UserProfile.picture: (fields.E210) Cannot use ImageField because Pillow is not installed.

HINT: Get Pillow at https://pypi.python.org/pypi/Pillow or run command "pip install pillow".
System check identified 1 issue (0 silenced).

This is installation Summary of pillow

PIL SETUP SUMMARY
version Pillow 2.6.1
platform linux 3.4.2 (default, Oct 8 2014, 13:08:17) [GCC 4.9.1]

--- TKINTER support available
--- JPEG support available
--- OPENJPEG (JPEG2000) support not available
--- ZLIB (PNG/ZIP) support available
--- LIBTIFF support available
--- FREETYPE2 support available
--- LITTLECMS2 support available
--- WEBP support available
--- WEBPMUX support available
+1 vote

I want to install path.py in my Python 3.4 environment on a Centos 5 box. My /usr/local/bin/ contains:

easy_install-3.4 
python3.4  
etc. 

We are behind a proxy server and I tried this:

# /usr/local/bin/easy_install-3.4 path.py 

Searching for path.py 
Reading https://pypi.python.org/simple/path.py/ 
Download error on https://pypi.python.org/simple/path.py/: hostname '172.29.68.1  
' doesn't match either of 'www.python.org', 'python.org', 'pypi.python.org',  
'docs.python.org', 'testpypi.python.org', 'bugs.python.org', 'wiki.python.org',  
'hg.python.org', 'mail.python.org', 'packaging.python.org', 'pythonhosted.org',  
'www.pythonhosted.org', 'test.pythonhosted.org', 'us.pycon.org', 'id.python.org' --  
Some packages may not be found! 

Couldn't find index page for 'path.py' (maybe misspelled?), Am I best to use pip or easy_install? also if easy_install, how can I fix the above error?

+3 votes

When I start a python-script I get messages like "module_x is missing". I then perform an apt-cache search module_x, followed by an apt-get install name_of_missing_module.deb

I was wondering whether someone here has a kind of method which automatically looks for the missing modules as debian-packages and offers to install them?

...