0

I'm trying to install Pillow for Python and i run this command on the terminal

sudo pip install Pillow

and i get this error

clang: error: no such file or directory: 'build/temp.macosx-10.10-intel-2.7/_imagingtk.o'

clang: error: no such file or directory: 'build/temp.macosx-10.10-intel-2.7/Tk/tkImaging.o'

error: command 'cc' failed with exit status 1

Any solutions for this? i tried looking in stack overflow only similar errors but not the same one

DelGiudice
  • 1,847
  • 1
  • 17
  • 14

5 Answers5

4

This might be the same as this bug in Pillow 2.5.0.

It's been fixed, to be released soon in 2.5.1.

To test the dev version:

sudo pip install git+https://github.com/python-pillow/Pillow.git

Or install version 2.4.0:

sudo pip install pillow==2.4.0

Edit: Pillow 2.5.1 has now been released so you can just do:

sudo pip install pillow
Hugo
  • 27,885
  • 8
  • 82
  • 98
  • @akashrajkn What about with the latest Pillow 3.4.2? Does it work with Pillow 2.4.0? Does it work with the latest dev version? What Python version are you using? – Hugo Nov 22 '16 at 08:55
  • I tried installing Pillow 3.4.2, it worked. Thanks! – akashrajkn Nov 22 '16 at 12:09
2

First: Install python-dev

apt-get install python-dev

After: install PILLOW

pip install pillow
erajuan
  • 2,224
  • 20
  • 31
1
$ sudo easy_install pip==20.3.4
    
$ sudo apt-get build-dep pillow
    
$ sudo pip2 install pillow
Successfully installed pillow-6.2.2

This solution was tested on:

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.7 LTS
Release:    16.04
Codename:   xenial.

It was run on 32bit Chromenotebook

mousetail
  • 7,009
  • 4
  • 25
  • 45
0

Try running this command:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install pillow

(You may find additional possible answers at this similar question: Installing Pillow/PIL on Mavericks)

Community
  • 1
  • 1
mrgnw
  • 1,771
  • 2
  • 17
  • 19
0

If you're on macOS, try: brew install libtiff libjpeg webp littlecms

rachwa
  • 1,805
  • 1
  • 14
  • 17
finegorko
  • 57
  • 8