error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1

Usually the reason is:

1. System development libraries packages are missing:

sudo apt-get install python-dev

Or other libs:
mysql – sudo apt-get install libmysqlclient-dev
lxml – sudo apt-get install libxml2-dev libxslt1-dev

2. You are not running pip from within your virtual environment:

source  yourenv/bin/activate
pip install YOUR_PACKAGE

3. Or when you installing PIL you need to specify:

CFLAGS='-march=x86-64' pip install PIL

Leave a Reply

Your email address will not be published. Required fields are marked *