When I running
sudo pip install lxml, a error occur says I need to install libxml2 and libxslt. After looking up online, I found the resolution for that problem.
sudo apt-get install python-lxml
sudo apt-get install python3-lxml
sudo port install py27-lxml
sudo apt-get install libxml2-dev libxslt-dev python-dev
For Debian based systems, it should be enough to install the known build dependencies of the provided lxml package, e.g.
sudo apt-get build-dep python3-lxml
sudo pip install lxml