0

Error trying to install lxml (following Hitchhiker's guide to Python -- http://docs.python-guide.org/en/latest/scenarios/scrape/#lxml-and-requests)

Here is the error log:

http://pastebin.com/p37CRUKV

What should I do?

I tried pip install libxslt & pip install libxml2 but I got errors from both of these: libxslt -- http://pastebin.com/ZJhvgHhd; libxml2 -- http://pastebin.com/eyE2Wbg2#

I also tried using easy_install lxml but it failed too.

2
  • ** make sure the development packages of libxml2 and libxslt are installed ** -- have you installed them? Commented Dec 19, 2013 at 1:09
  • Hi Lambda, I added the error logs from trying to pip install those to my post. I'm following scanny's advice though anyway and it seems to be working. Commented Dec 19, 2013 at 13:08

1 Answer 1

2

Looks like you're on Windows. You'll almost certainly want to install from a binary installer. Back in a second with the link ...

Here you go: http://www.lfd.uci.edu/~gohlke/pythonlibs/

lxml is a Python binding on the libxml2 and libxslt C libraries. As a result, the install involves a compile step, AND you need to have those two libraries installed. As a (big) convenience, the binary installer is provided that has all that bit done for you. Big job otherwise, involving having Visual Studio C compiler installed and other bits that are pretty hairy if you don't have occasion to do that sort of thing much :)

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.