Matplotlib – Installation

Using the Git repository (2011-06-14)

git clone

python build

sudo python install

HowTo check the installed version (2011-06-26)


import matplotlib


Installing newest version under Ubuntu 10.10

One can obtain it from According to the INSTALL file I install the following packages:

sudo apt-get install libfreetype6

sudo apt-get install libfreetype6-dev

sudo apt-get install libpng12-0

sudo apt-get install libpng12-dev

sudo apt-get install zlib1g

sudo apt-get install zlib1g-dev

(They where all already installed..) And then also

sudo apt-get install python-gtk2

sudo apt-get install python-gtk2-dev

sudo apt-get install python-qt4

sudo apt-get install python-qt4-dev

sudo apt-get install tcl

sudo apt-get install tcl-dev

sudo apt-get install tk

sudo apt-get install tk-dev

sudo apt-get install python-tk

sudo apt-get install libglib2.0-0

sudo apt-get install libglib2.0-dev

Here at least some of the dev-packages where not present. One can search for the right package name via

sudo apt-cache search xxx

Note that on Ubuntu the devel packages are usually abbriviated by dev.

After I installed all this packages I tried

python build

I obtained the following errors:

/usr/bin/ld: cannot find -ltk8.5
/usr/bin/ld: cannot find -ltcl8.5

Then I upgraded the packages

sudo apt-get upgrade

And updated the library cache

sudo ldconfig

After installing and removing a few packages I finally found out that one has to install

sudo apt-get install tcl8.5-dev

sudo apt-get install tk8.5-dev

explicitly in order to obtain the right dev-support…

Using the subversion repository

svn co matplotlib

Since this is far too long I just loaded

svn co

Then I discovered problems with

matplotlib/ in <module>()
32 import numpy as np
33 from numpy import ma
—> 34 from matplotlib._path import affine_transform
35 from numpy.linalg import inv

ImportError: No module named _path

So maybe I need more than just that and I tried

svn co

python build

Due to the fact that I already build the release condidate by myself (see above), everything should work fine… And it Did!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: