Pillow installation error: command 'gcc' failed with exit status 1

前端 未结 6 1372
迷失自我
迷失自我 2020-12-31 05:39

I am trying to setup my Django variant (Wagtail) but have problems installing the required Pillow.

Background: Am running Python 2.6.6, in virtua

相关标签:
6条回答
  • 2020-12-31 06:09

    Make sure you have gcc and python-dev installed

    sudo apt-get install gcc python-dev

    0 讨论(0)
  • 2020-12-31 06:12

    You have to execute it in root directory.

    0 讨论(0)
  • 2020-12-31 06:14

    Solved. Priyank Patel was right... it's a server-side permission issue. Thank you all!

    unable to execute gcc: Permission denied . Ask hosting provide to run your command for you . – Priyank Patel yesterday

    0 讨论(0)
  • 2020-12-31 06:19

    Try running this in terminal:

    export CFLAGS=-Qunused-arguments
    export CPPFLAGS=-Qunused-arguments
    

    Then pip install Pillow

    0 讨论(0)
  • 2020-12-31 06:30

    I had a similar problem (gcc failed, but no mention of permissions), but it was dependencies that were my problem. By the way, my task was to install Pillow on a raspberry pi, which is why those dev libraries were necessary. They may not be necessary for you. It was the python-imaging command that did the trick most, I think. Here's what I did:

    # Add the deb-src for each deb in /etc/apt/sources list
    sudo apt-get update
    sudo apt-get install python2.7-dev tk8.5 tcl8.5 tk8.5-dev tcl8.5-dev
    sudo apt-get build-dep python-imaging --fix-missing
    sudo pip install Pillow
    

    Sources: https://github.com/python-imaging/Pillow/issues/322 http://forums.getpebble.com/discussion/8490/ubuntu-install-problem-when-it-comes-to-pip https://unix.stackexchange.com/questions/105265/install-pil-pillow-via-pip-in-debian-testing-jessie

    0 讨论(0)
  • 2020-12-31 06:30

    In case this helps anyone else. This may be what the service provider did.

    On CentOS I ended up having to install Python headers to fix the problem.

    yum install python-devel
    

    then

    pip install Pillow
    
    0 讨论(0)
提交回复
热议问题