11

I've searched but theres no libxml2 binaries for py2.7.

I have also tried running setup.py for version py2.6.9 but it gave me the error

failed to find headers for libxml2: update includes_dir

Does anyone have a solution?

goh
  • 27,631
  • 28
  • 89
  • 151
  • Are you after lxml for python27 windows? – MattH Aug 19 '10 at 12:36
  • I believe you mean the [libxml2-python bindings version 2.6.9](ftp://xmlsoft.org/libxml2/python/), not Python version 2.6.9. – ewall Aug 19 '10 at 13:41
  • 1
    In order to compile that from source on Windows, you will need a valid C compiler, libxml2 development headers, and more... which is not likely to work. Like @MattH, I too would steer you towards using [lxml](http://codespeak.net/lxml/installation.html#ms-windows) instead, which you can probably install with only the command `easy_install lxml`. – ewall Aug 19 '10 at 13:45
  • @ewall: Sadly it's not that easy to install lxml on windows, there are library dependencies and compiling to be done. I found a `lxml-build.py` script from a post somewhere or other, then I had to install VisualStudio as the build with mingw32 failed. After doing all this today I thought I might try to contribute the hard-won binary to pypi, but I'm getting funny errors and I've just about lost patience with trying today. – MattH Aug 19 '10 at 14:20
  • @ewall, I have tried lxml with easy_install but was not successful/ Forgot whats the error.. Have switched to 2.6 lest more such errors occur after this. – goh Aug 20 '10 at 04:53
  • Good thinking; you're sure to find a lot more compatibility with v2.6! – ewall Aug 20 '10 at 13:09

1 Answers1

10

Some time before I found a good page with prebuilt libraries for different versions of python and arch: http://www.lfd.uci.edu/~gohlke/pythonlibs/

I suspect it will be useful for you.

Jack Bahou
  • 47
  • 8
Eir Nym
  • 1,515
  • 19
  • 30