Pip install reportlab error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

use ubuntu virtualenv. I tray to install reportlab

pip install reportlab command

in this directory (Society2) Stefano @ Stefano-X550EP: ~ / HTDOCS / Society2 $

error Error: command "x86_64-linux-gnu-gcc" failed with exit status 1

actually list of pips: argparse (1.2.1) Django (1.7.7) html5lib (0.999) pip (1.5.4) pisa (3,0,33) PyPDF2 (1,24) setuptools (2.2) wsgiref (0.1. 2) xhtml2pdf (0.0.6)

I need reportlab to use xhtml2pdf, because now the django project gave me this error: There is no module named reportlab.lib.colors

+4
source share
3 answers

without your complete error log, it's impossible to say. But I'm sure you simply do not have python-dev.

try installing it:

$ sudo apt-get install python-dev

then install the reportlab report again.

hope this helps.

see: installing Reportlab (error: gcc command failed with exit status 1)

+11
source

Sudo apt-get install python-dev is almost correct. But if you are using Python 3.x, you need to modify it to install python3-dev. This pretty much affected my django, postgresql, venv settings.

+1
source

I also had the same issue when installing readability-lxml python package. Then I tried to install the following packages and it worked for me.

sudo apt install libpq-dev python-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev
0
source

Source: https://habr.com/ru/post/1583827/


All Articles