pythonlxmllibxml2libxsltpykml

Python libraries needed to interact withPyKML. Need some guidance with libxml2 and libxslt


I am teaching myself Python, and thanks to the great help I am getting here when I am stuck with something, I am happy with my progress.

I am working on a project that retrieves a bunch of records from several APIs, data mines addresses, extracts geolocations (using GeoPy), and now I want to visualize them in Google earth.

The perfect library for I want to do is PyKML. It looks pretty straightforward, specially since I want to recreate the "circle around locations" tour in the PyKML documentation, enabling me to do some programmatic creation of KML documents.

The problem I am having is that PyKML depends on lxml, and lxml depends on libxml2 & libxslt, and I have not been able to install any of them.

I am not sure what those libraries are for, and I don't even know if I can run then in my machine (I am using windows). The documentation for libxml2 and libxslt is particularly confusing to me, since there is mention of C language and compilers.

Could anybody indicate to me what's the proper way to "install" and test lxml, libxml2, and libxslt to use with Python? Does anybody know of other Python libraries that allow for programmatic creation of KML documents, and preferably, that do not depend on other libraries?

Thanks in advance for your help. Cheers


Solved

I solved the problem by uninstalling 64-bit version of Python for Windows and installing the 32-bit version.

Additionally, I installed the 32-bit binary build of lxml 2.3 for Python 2.6 from here:

http://pypi.python.org/pypi/lxml/2.3

I think the problem was incompatibility between some of the components of Python 2.6 64, and all the libraries the lxml needed to work.


Solution

  • I solved the problem by uninstalling 64-bit version of Python for Windows and installing the 32-bit version.

    Additionally, I installed the 32-bit binary build of lxml 2.3 for Python 2.6 from here:

    http://pypi.python.org/pypi/lxml/2.3

    I think the problem was incompatibility between some of the components of Python 2.6 64, and all the libraries the lxml needed to work.