Reprinted from: http://blog.csdn.net/wang1144/article/details/42277179
In the ubuntu14.04 version of the installation of lxml, always error, after a hard search, finally found out the correct method of installation, in fact, is not dependent on packaging full:
sudo apt-get install Libxml2-dev libxslt1-dev Python-dev
sudo apt-get install Zlib1g-dev
sudo apt-get install Libevent-dev
sudo pip install lxml
Halfway through Pip install lxml may encounter an incorrect recognition situation and need to apt-get update to continue
Reference URL:
Http://lxml.de/installation.html
http://blog.marchtea.com/archives/104
Http://blog.marchtea.com/archives/91
The following are the previous references and may also be installed successfully
sudo apt-get install Python-twisted-web Python2.7-dev
Install PIP:
$ wget https://bootstrap.pypa.io/get-pip.py...$ sudo python get-pip.py install
The following error occurred when using PIP to install/upgrade lxml (up to 3.3.5):
"Error:command ' X86_64-LINUX-GNU-GCC ' failed with exit status 1"
This is because some dependent packages are not installed, and you can update the dependent packages with the following command:
$sudo Apt-get BUILD-DEP Python-lxml
After the dependency package has been updated, perform the PIP installation again:
$ sudo pip install lxml--upgrade
Error:command ' X86_64-LINUX-GNU-GCC ' failed with exit status 1