I\'m attempting to use lxml
as the parser for BeautifulSoup because the default one is MUCH slower, however i\'m getting this error:
soup =
Go to these pages:
https://pypi.python.org/pypi/cssselect
https://pypi.python.org/pypi/lxml/3.2.5
download the source files for both packages. Expand each of them into a different folder. Then in each folder locate the setup.py file and run the following command:
python setup.py install
You may run into some problems with lxml. If you get an error like
error: command 'gcc' failed with exit status 1
make sure you install libxml2-dev & libxslt1-dev using
sudo apt-get install libxml2-dev libxslt1-dev
Hopefully that should work.
It looks like lxml has not been successfully installed. To install lxml
on Ubuntu, run
sudo apt-get install libxslt1-dev libxml2
In virtualenv:
pip install --upgrade lxml
pip install cssselect