Bringing Matplotlib to the Browser

Installing mpld3

«  Quick Start Guide   ::   Contents   ::   Frequently Asked Questions  »

Installing mpld3

Installing released versions

The mpld3 project is compatible with Python 2.6-2.7 and 3.3-3.4. To install the latest release, you can use the pip installer as follows:

[~]$ pip install mpld3

If you’ve downloaded the tarball of the source distribution, you can type:

[~]$ python install

or to specify another install location, use:

[~]$ python install --prefix=/path/to/location/

Installing from git

The mpld3 source is available on GitHub. Installing from source requires one extra build step to sync the mplexporter submodule. When installing from the gihub source, use:

[~]$ python submodule
[~]$ python install

Building JavaScript Sources

A core piece of the mpld3 package are the JavaScript libraries, which are located in the package in the mpld3/js/ directory. The mpld3.*.js is automatically constructed from a number of source JavaScript files; if you modify these sources, the libraries must be re-built before mpld3 is installed. For more information, please refer to, found in the project repository.


The mpld3 package is compatible with Python versions 2.6, 2.7, 3.3, and 3.4. It requires matplotlib version 1.3+ and jinja2 version 2.7+. Optionally, mpld3 can be used within the IPython notebook, and requires IPython version 1.0+, and preferably IPython 2.0+ (see notes in the documentation of mpld3.enable_notebook()).

«  Quick Start Guide   ::   Contents   ::   Frequently Asked Questions  »