Matplotlib wont compile on ubuntu

Good, glad to be of help.

Ben Root

···

On Fri, Dec 3, 2010 at 9:06 AM, Matt <mxk@…3358…> wrote:

Thanks so much, Ben, that did work.

Matt

On Fri, Dec 3, 2010 at 2:57 PM, Benjamin Root <ben.root@…1304…> wrote:

On Fri, Dec 3, 2010 at 8:49 AM, Matt <mxk@…3358…> wrote:

LINUX

Linux ubuntu 2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC

2010 i686 GNU/Linux

GCC

gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5

Copyright (C) 2010 Free Software Foundation, Inc.

MATPLOTLIB

ubuntu@…859…:~/Desktop/mp$ python -c `import matplotlib; print

matplotlib.version`

The program ‘import’ can be found in the following packages:

  • imagemagick
  • graphicsmagick-imagemagick-compat (You will have to enable

component called ‘universe’)

Try: sudo apt-get install

Warning: unknown mime-type for “matplotlib.version” – using

“application/octet-stream”

Error: no such file “matplotlib.version

Argument expected for the -c option

usage: python [option] … [-c cmd | -m mod | file | -] [arg] …

Try `python -h’ for more information.

OUTPUT

ubuntu@…859…:~/Desktop/mp$ sudo apt-get install python-matplotlib

Reading package lists… Done

Building dependency tree

Reading state information… Done

Package python-matplotlib is not available, but is referred to by

another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

E: Package ‘python-matplotlib’ has no installation candidate

Matt, in your first command, you used a backtick, which is different from a

single quote. A phrase quoted by a backtick will execute as a shell command

and put its output in place for the rest of the shell command.

Then, the reason you probably can’t find matplotlib is that you probably

don’t have the other repos turned on. I forget which repo matplotlib is in,

but it might be the “universe” repo. If you open the synaptic package

manager and view the available repositories (it is in the menu items, I

forget which), you can turn on other Ubuntu repos.

Let us know how that works for you.

Ben Root