Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I installed matplotlib 1.1 from source, but I cant get any plot to show. python setup.py build shows the following:

BUILDING MATPLOTLIB
            matplotlib: 1.1.0
                python: 2.7.2+ (default, Oct  4 2011, 20:06:09)  [GCC 4.6.1]
              platform: linux2

REQUIRED DEPENDENCIES
                 numpy: 1.5.1
             freetype2: 12.2.6

OPTIONAL BACKEND DEPENDENCIES
                libpng: 1.2.46
               Tkinter: no
                        * Using default library and include directories for
                        * Tcl and Tk because a Tk window failed to open.
                        * You may need to define DISPLAY for Tk to work so
                        * that setup can determine where your libraries are
                        * located. Tkinter present, but header files are not
                        * found. You may need to install development
                        * packages.

(setup.py:14683): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(setup.py:14683): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(setup.py:14683): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(setup.py:14683): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
            pkg-config: looking for pygtk-2.0 gtk+-2.0
                        * Package pygtk-2.0 was not found in the pkg-config
                        * search path. Perhaps you should add the directory
                        * containing `pygtk-2.0.pc' to the PKG_CONFIG_PATH
                        * environment variable No package 'pygtk-2.0' found
                        * You may need to install 'dev' package(s) to
                        * provide header files.
                  Gtk+: no
                        * Could not find Gtk+ headers in any of
                        * '/usr/local/include', '/usr/include', '.'
       Mac OS X native: no
                    Qt: no
                   Qt4: no
                 Cairo: 1.8.8

OPTIONAL DATE/TIMEZONE DEPENDENCIES
              datetime: present, version unknown
              dateutil: 1.4.1
                  pytz: 2011c

OPTIONAL USETEX DEPENDENCIES
                dvipng: no
           ghostscript: 9.04
                 latex: no
               pdftops: 0.16.7

But I think I already have tkinter and gtk libraries. Any help ?

share|improve this question

migrated from stackoverflow.com Apr 23 '12 at 13:21

This question came from our site for professional and enthusiast programmers.

    
You mean asking it there? –  vivek Apr 20 '12 at 7:07
    
Yep :) It's part of the stackexchange-network, so you can simply login with your SO-credentials there. The guys there love questions about Ubuntu :) –  Quasdunk Apr 20 '12 at 7:08
    
@Quasdunk, I've flagged it and asked it to be moved. If that doesn't work, I'll post it there too. thanx –  vivek Apr 20 '12 at 7:13
    
I'm sure you'll get help there quickly :) Goo luck! –  Quasdunk Apr 20 '12 at 7:19
1  
The output shows you have no dependecies required for plotting, no tk, no gtk. To get this on Ubuntu do: aptitude build-dep python-matplotlib (You should remove the old installation, and recompile again, see a convinient way here: stackoverflow.com/questions/4781434/…) –  Oz123 Apr 23 '12 at 6:46
add comment

1 Answer 1

up vote 3 down vote accepted

To elaborate on Oz123's comment, apt-get build-dep foo (or aptitude) allows you to pull all packages needed to build foo from the repositories. Thus, to install the necessary build dependencies for matplotlib, run apt-get build-dep matplotlib

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.