Instalando o matplotlib 1.1.0 no Ubuntu 11.10

2

Eu instalei o matplotlib 1.1 da fonte, mas não consigo mostrar nenhum gráfico. python setup.py build mostra o seguinte:

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

Mas eu acho que já tenho bibliotecas tkinter e gtk. Alguma ajuda?

    
por vivek 20.04.2012 / 09:02

1 resposta

3

Para elaborar o comentário do Oz123, apt-get build-dep foo (ou aptitude) permite que você puxe todos os pacotes necessários para construir foo a partir dos repositórios. Assim, para instalar as dependências de construção necessárias para o matplotlib, execute apt-get build-dep matplotlib

    
por Egil 23.04.2012 / 15:31