Installing pyKML

Linux Installation

Installing the Dependencies

pyKML depends on the lxml Python library, which in turn depends on two C libraries: libxml2 and libxslt. Given this, the first step to installing pyKML is to get lxml running on your system. Refer to the lxml website for instructions on how to install lxml.

To verify that the lxml library has been installed correctly, open up a Python shell and type:

>>> import lxml
>>>

If you don’t get back an error message, lxml has been installed and you are ready to proceed.

Installing the pyKML package

pyKML itself can be installed from the Python Package Index, using either pip or easy_install:

$ pip install pykml

or:

$ easy_install pykml

To verify that the pyKML library has been installed correctly, open up a Python shell and type:

>>> import pykml
>>>

Once again, if you don’t get back an error, pyKML has been installed correctly. To learn how to start using pyKML, head on over to the pyKML Tutorial.

Building pyKML documentation

The pyKML documentation is built using Sphinx and uses the ipython_directive extension provided by the matplotlib project. Because of this, building the documentation requires that Sphinx 1.0, ipython and matplotlib be installed on your system.

Note

Note that there appears to be a bug that prevents building documentation when using the Ubuntu 10.04’s default versions of the libraries. The documentation has been successfully built using the default libraries of Ubuntu 11.04.

Table Of Contents

Previous topic

Welcome to pyKML

Next topic

pyKML Tutorial

This Page