[prev in list] [next in list] [prev in thread] [next in thread] 

List:       py2exe-users
Subject:    [Py2exe-users] matplotlib, gtk backend, Pixbuf
From:       "Gael Ecorchard" <gael.ecorchard () s2001 ! tu-chemnitz ! de>
Date:       2010-04-16 9:00:31
Message-ID: 7F0B718D9238408688E7042F509B6A2C () iwu ! fraunhofer ! de
[Download RAW message or body]

Hi,

I have a problem running an exe compiled with py2exe with matplotlib and
gtk.

When I run the exe, I get the error
Traceback (most recent call last):
  File "anapa.py", line 15, in <module>
  File "matplotlib\backends\backend_gtk.pyc", line 25, in <module>
  File "matplotlib\backends\backend_gdk.pyc", line 29, in <module>
  File "matplotlib\backends\_backend_gdk.pyc", line 12, in <module>
  File "matplotlib\backends\_backend_gdk.pyc", line 10, in __load
AttributeError: 'module' object has no attribute 'Pixbuf'

Can someone help? The problem also occurs if I use GTKAgg.

Here's my setup:

---------------------------
setup.py:

from distutils.core import setup
import py2exe
import matplotlib

includes = ['cairo']
excludes = []

setup(
    # The first three parameters are not required, if at least a
    # 'version' is given, then a versioninfo resource is built from
    # them and added to the executables.
    version = "1.0",
    description = "Doesn't work anyway",
    name = "anapa",
    options = {
        'py2exe': {
            'includes': includes,
            'excludes': excludes
        }
    },
    data_files = matplotlib.get_py2exe_datafiles(),

    # targets to build
    console = ["anapa.py"],
    )

---------------------------
extract of anapa.py:

import pygtk
pygtk.require('2.0')
import gtk

import matplotlib
matplotlib.use('GTK')
from matplotlib.figure import Figure
from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
from matplotlib.backends.backend_gtk import NavigationToolbar2GTK as
NavigationToolbar
import numpy as np

---------------------------
versions:
python 2.6
matplotlib.__version__ '0.99.1'
py2exe.__version__ '0.6.9'

Many, many thanks for help,
Gael


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Py2exe-users mailing list
Py2exe-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/py2exe-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic