please upgrade python-matplotlib to version later than 0.90.1

Bug #195772 reported by Rolf Leggewie on 2008-02-26
Affects Status Importance Assigned to Milestone
matplotlib (Ubuntu)
Morten Kjeldgaard
Nominated for Gutsy by Rolf Leggewie

Bug Description

please upgrade to a more recent version of python-matplotlib. 0.90.1 is broken as evidenced here:

Related branches

jelias (jeffrey-eliasen) wrote :

I'm happy to take this on with a mentor...

Changed in matplotlib:
assignee: nobody → jeffrey-eliasen
Benjamin Drung (bdrung) wrote :

I have made an package for matplotlib 0.91.2 (the current stable version). I took the 0.90.1-4 from Debian as basis. Here are my changes.

Benjamin Drung (bdrung) wrote :
Benjamin Drung (bdrung) wrote :
jelias (jeffrey-eliasen) wrote :

since you're actively working on this, how do I unassign myself from the bug?

William Grant (wgrant) wrote :

You'll need a FeatureFreeze exception for this. See Once you've done that, subscribe ubuntu-universe-sponsors to this bug.

Changed in matplotlib:
assignee: jeffrey-eliasen → overbenny
wegfwe432 (tr76) wrote :

I'm having trouble installing the debian package. I can't seem to find the *.deb to run, and I appear to be compiling from the source when I run the tar gz posted above.

LaserJock (laserjock) wrote :

Why don't we fix the bug in our existing package and wait for Intrepid to get newer matplotlib? It looks like a fairly trivial patch.

Rolf Leggewie (r0lf) wrote :

Jordan, I'd be cool with that, either way. Can you provide a diff?

I'll try to compile the sources provided by Benjamin, now.

Benjamin Drung (bdrung) wrote :

To compile the package:

Download the three files: matplotlib_0.91.2-0ubuntu1.diff, matplotlib_0.91.2-0ubuntu1.dsc and matplotlib_0.91.2.orig.tar.gz

Then run in a terminal:

sudo apt-get build-dep matplotlib
dpkg-source -x matplotlib_0.91.2-0ubuntu1.dsc
cd matplotlib-0.91.2

After that you should have a package which you can install with dpkg.

Benjamin Drung (bdrung) wrote :

I think this package is no FeatureFreeze exception. There are too many changes between 0.90.1 and 0.91.2. model-builder is depending on matplotlib and I don't know, if the new version breaks something. We should get the new version into the next release (Intrepid) and maybe back port the package to Hardy.

wegfwe432 (tr76) wrote :

I tried to follow the compilation directions provided above. Unfortunately, I'm still having problems. Here is the output I get:

me@my-computer:~/Downloads/matplotlib$ sudo apt-get build-dep matplotlib
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Could not open file /var/lib/apt/lists/anakonda.altervista.org_debian_sources_Sources - open (2 No such file or directory)
me@my-computer:~/Downloads/matplotlib$ dpkg-source -x matplotlib_0.91.2-0ubuntu1.dsc
gpg: failed to create temporary file `/home/tr76/.gnupg/.#lk0x6e5460.tr76-laptop.6954': Permission denied
gpg: keyblock resource `/home/tr76/.gnupg/pubring.gpg': general error
gpg: Signature made Sun 23 Mar 2008 07:20:35 PM EDT using DSA key ID 0A1BC27E
gpg: Can't check signature: public key not found
dpkg-source: failure: cannot read ./matplotlib_0.91.2-0ubuntu1.diff.gz: No such file or directory

I can't continue since there is no directory to CD into.

GG (giorgio-gilestro) wrote :

I don't quite understand: Benjamin, if you succeeded in making the deb package why don't you attach it here so that we could test it and if it is good we are set to go.

Benjamin Drung (bdrung) wrote :

@wegfwe432: last line of your output: the file matplotlib_0.91.2-0ubuntu1.diff.gz is not found in the current working directory ~/Downloads/matplotlib

@GG: Here is my deb package, but it's the amd64 version. All my computers are running the 64 bit version. So if you do not use the amd64 version, you have to build your own package. It's not so complicated.

wegfwe432 (tr76) wrote :


I am running Ubuntu 7.10 64 bit. I tried you package and I get the following error:
Error: Dependency is not satisfiable: libc6

I looked in Synaptic and libc6 and libc6-dev are installed, version 2.6.1-1ubuntu10 for both.

Also, where can I get matplotlib_0.91.2-0ubuntu1.diff.gz to try to make my own package? Is this just an archive of the diff file posted above?


Rolf Leggewie (r0lf) wrote :

Debs compiled from the source that Benjamin provided is available in my PPA:

Benjamin Drung (bdrung) wrote :


the package is compiled for Hardy, so it does not fit. Attached the package I use in Gutsy.

matplotlib_0.91.2-0ubuntu1.diff.gz is only the archive of the matplotlib_0.91.2-0ubuntu1.diff file.

wegfwe432 (tr76) wrote :

Thank you very much for your responses.

I installed Rolf's python-matplotlib-data and python-matplotlib-doc packages and Benjamin's gutsy python-matplotlib. However, now I'm getting the following errors when I try to run Matplotlib scripts:

me@my-computer:~$ python
Traceback (most recent call last):
  File "", line 1, in <module>
    from pylab import *
  File "/usr/lib/python2.5/site-packages/", line 1, in <module>
    from matplotlib.pylab import *
  File "/usr/lib/python2.5/site-packages/matplotlib/", line 639, in <module>
    rcParams = rc_params()
  File "/usr/lib/python2.5/site-packages/matplotlib/", line 562, in rc_params
    fname = matplotlib_fname()
  File "/usr/lib/python2.5/site-packages/matplotlib/", line 517, in matplotlib_fname
    path = get_data_path() # guaranteed to exist or raise
  File "/usr/lib/python2.5/site-packages/matplotlib/", line 207, in wrapper
    ret = func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/matplotlib/", line 447, in _get_data_path_cached
    defaultParams['datapath'][0] = _get_data_path()
  File "/usr/lib/python2.5/site-packages/matplotlib/", line 443, in _get_data_path
    raise RuntimeError('Could not find the matplotlib data files')
RuntimeError: Could not find the matplotlib data files

The script that I'm running is:

from pylab import *

Does anyone see where the problem is?


Benjamin Drung (bdrung) wrote :

My deb file was an old version. I took the I uploaded here and build the gutsy package again. Please try if it now works.

wegfwe432 (tr76) wrote :

Yes. This new package works on the simple script in my previous post. I will be trying it on more complicated figures later and I will post back if there are any problems.

Thank you very much for your assistance.

The new package collides with python-enthought-traits. Specifically I got
a collision with:

But I imagine there are others.

Rolf Leggewie (r0lf) wrote :

Benjamin, can you update your packages?

Changed in matplotlib:
status: New → Triaged
Benjamin Drung (bdrung) wrote :

matplotlib (0.91.2-0ubuntu1) hardy; urgency=low

  * New upstream version
  * removed NUMARRAY_ISSUES in debian/rules and in debian/docs
  * debian/control: Change Maintainer/XSBC-Original-Maintainer field.
  * debian/patches: updated build_fix.patch and matplotlibrc_fix.patch
  * Added dvipng, python-configobj, python-enthought-traits (>= 2.0) to package
    and build dependency.
  * Added python-qt-dev, python-qt4-dev and python-wxgtk2.8 to build dependency.

 -- Benjamin Drung <email address hidden> Wed, 09 Apr 2008 17:44:30 +0200

Now matplotlib depends on python-enthought-traits and does not use its own version.

Benjamin Drung (bdrung) wrote :
Benjamin Drung (bdrung) wrote :

There are some warning from dpkg-shlibdeps at the end of the log file. How can I fix them?

Morten Kjeldgaard (mok0) wrote :

AFAIK there is not much you can do about these warnings other than ignore them.

Another thing is that you are getting warnings from gpg about the ownership of /home/ubuntu/.gnupg/gpg.conf; you should probably change the ownership of that file to your uid, and also make sure all the files in /home/ubuntu/.gnupg are protected.

Benjamin Drung (bdrung) wrote :

The warning from gpg is harmless. I used the live cd from hardy. Because I was lazy to change the access rights I used sudo to compile the package.

Morten Kjeldgaard (mok0) wrote :

Please evaluate this package wrt. granting an FFE. Given the problems with the current version, I recommend that the update is made. As can be seen from the attached changelog (abbreviated to show only relevant changes) there are quite a number of modfications by the upstream authors, both new features, enhancements and bug fixes.

However, given that this is a rather specialized package for a limited number of users, I think it is reasonable to update it, even at this late time in hardy's cycle.

I have built the source package and am ready to upload it as soon as I have checked that it works, given the FFE is granted.

Changed in matplotlib:
assignee: overbenny → mok0
importance: Undecided → Wishlist
status: Triaged → Confirmed
Benjamin Drung (bdrung) wrote :
Scott Kitterman (kitterman) wrote :

Ack from me. Please make sure the package provides python:provides and conflicts/replaces python2.4-matplotlib for dapper upgrade support.

Benjamin Drung (bdrung) wrote :

Yes, it is in debian/control:

Package: python-matplotlib
Provides: ${python:Provides}
Conflicts: python2.4-matplotlib
Replaces: python2.4-matplotlib

Benjamin Drung (bdrung) wrote :

One small thing is missing: In the debian/control should be added that the new package version closes this bug (#195772).

StefanPotyra (sistpoty) wrote :

Basically, looks ok, however not all changes to packaging are documented in debian/changelog.

Fujitsu, you did the last upload to unstable, can you give an ACK/REJ instead of me? thanks.

William Grant (wgrant) wrote :

I say go for it, although the changes aren't small. Make sure all packaging changes are documented in debian/changelog, as Stefan says.

Morten Kjeldgaard (mok0) wrote :

debian/changelog now properly merged. Uploaded (currently awaits approval by distro manager).

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package matplotlib - 0.91.2-0ubuntu1

matplotlib (0.91.2-0ubuntu1) hardy; urgency=low

  * New upstream version (LP: #195772)
  * removed NUMARRAY_ISSUES in debian/rules and in debian/docs
  * debian/control: Change Maintainer/XSBC-Original-Maintainer field.
  * debian/patches: updated build_fix.patch and matplotlibrc_fix.patch
  * Added dvipng, python-configobj, python-enthought-traits (>= 2.0) to
    package and build dependency.
  * Added python-qt-dev, python-qt4-dev and python-wxgtk2.8 to build

matplotlib (0.90.1-4) unstable; urgency=low

  * Maintainer changed to Debian Python Modules Team
  * Vittorio Palmisano and Ondrej Certik added to Uploaders
  * "DM-Upload-Allowed: yes" field added
  * Standards-Version bumped to 3.7.3
  * python-numarray and python-numeric removed from build-depends and
    debian/rules fixed to make the package compile
  * debian/rules polished
  * patches moved under a quilt control
  * Package descriptions fixed (python -> Python)
  * Homepage field added (and removed from description)
  * python-matplotlib-doc package moved to the "doc" Section
  * /usr/share/matplotlib/mpl-data/images/*.svg made chmod 644 (i.e. not
  * debian/watch uncommented, as it seems to work (and last line removed)
  * python2.3-matplotlib removed from Conflicts/Replaces

 -- Benjamin Drung <email address hidden> Wed, 09 Apr 2008 17:44:30 +0200

Changed in matplotlib:
status: Confirmed → Fix Released
piccobello (piccobello) wrote :


I got the same error whenever I run help('modules keyword').

RuntimeError: Could not find the matplotlib data files

I did two things, which somehow fixed the problem for me:

1) sudo ln -s /usr/share/matplotlib/mpl-data/ /usr/lib/python2.5/site-packages/matplotlib/mpl-data

this gave me another error, which I realized was due to some initialization of the matplotlib module
trying to write to a file /usr/lib/python2.5/site-packages/matplotlib/matplotlib.conf

2) run python as sudo, and import matplotlib

now I don't get that error anymore.. sorry I did not find a more suited place to write about this..

To post a comment you must log in.