3

While i try to install Pillow 2.5.3 I am getting an error : command 'x86_64-linux-gnu-gcc' failed with exit status 1

Here is the complete log of what happened

I need this library as a part of another python project. I have gone through many solutions but none helped me

Alfie
  • 2,658
  • 1
  • 13
  • 26
  • Might be the same issue as here: [https://stackoverflow.com/questions/41492878/command-x86-64-linux-gnu-gcc-failed-with-exit-status-1/42690573#42690573](https://stackoverflow.com/questions/41492878/command-x86-64-linux-gnu-gcc-failed-with-exit-status-1/42690573#42690573) – Dana Spitzer Friedlander Nov 06 '17 at 14:46

3 Answers3

9

You are missing Python headers. Install python-dev from your distribution's package manager.

Equally for python 3. Install python3-dev, example:

sudo apt-get install python3-dev
erajuan
  • 2,134
  • 19
  • 31
Burhan Khalid
  • 161,711
  • 18
  • 231
  • 272
1

I have tried python-dev package but not worked for me. Then i have tried below code work like charm

sudo apt-get install build-essential libssl-dev libffi-dev python-dev
Hardik Gajjar
  • 985
  • 11
  • 27
0

If you are running python 3.6 the use this command

sudo apt-get install python3.6-dev

Shersha Fn
  • 1,351
  • 2
  • 22
  • 33