error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Updated 2026-10-02: swapped python-dev for python3-dev and trimmed the lxml packages.
sudo apt-get install python3-dev
Running that command on ubuntu will fix the issue.
If you’re installing lxml:
- http://stackoverflow.com/questions/16149613/installing-lxml-with-pip-in-virtualenv-ubuntu-12-10-error-command-gcc-failed
- https://lxml.de/installation.html
Also try this:
sudo apt-get install libxslt1-dev libxml2-dev libssl-dev