Hi all,
I have recently started using Python and I am trying to make a GUI out of Tkinter. I am using matplotlib for the graphic purposes. I have to make a exe file from this code. I use py2exe for this purpose but every time I try to make this exe using a setup file I get these errors. Final.py is my python code.
Traceback (most recent call last):
File "Final.py", line 5, in <module>
File "pylab.pyc", line 1, in <module>
File "matplotlib\pylab.pyc", line 204, in <module>
File "matplotlib\mpl.pyc", line 10, in <module>
File "matplotlib\figure.pyc", line 33, in <module>
File "matplotlib\projections\__init__.pyc", line 1, in <module>
File "matplotlib\projections\geo.pyc", line 4, in <module>
File "matplotlib\numerix\__init__.pyc", line 166, in <module>
ImportError: No module named ma
I checked out 'ma' which is actually a import line in geo.py which says:
from matplotlib.numerix import npyma as ma
I guess there is a problem with importing these files. This is my setup file:
from distutils.core import setup
import sys
import os
import glob
import py2exe
import matplotlib
import numpy
opts = {
'py2exe': { "includes" : [ "matplotlib.backends", "matplotlib.backends.backend_qt4agg",
"matplotlib.figure","pylab", "numpy", "matplotlib.numerix.fft",
"matplotlib.numerix.linear_algebra", "matplotlib.numerix.random_array",
"matplotlib.backends.backend_tkagg", "matplotlib.projections" , ],
'excludes': ['_gtkagg', '_tkagg', '_agg2', '_cairo', '_cocoaagg',
'_fltkagg', '_gtk', '_gtkcairo', ],
'dll_excludes': ['libgdk-win32-2.0-0.dll',
'libgobject-2.0-0.dll']
}
}
data_files = [(r'mpl-data', glob.glob(r'C:\Python25\Lib\site-packages\matplotlib\mpl-data\*.*')),
(r'mpl-data', [r'C:\Python25\Lib\site-packages\matplotlib\mpl-data\matplotlibrc']),
(r'mpl-data\images',glob.glob(r'C:\Python25\Lib\site-packages\matplotlib\mpl-data\images\*.*')),
(r'mpl-data\fonts',glob.glob(r'C:\Python25\Lib\site-packages\matplotlib\mpl-data\fonts\*.*'))]
setup(windows=[{"script" : "Final.py"}], options=opts, data_files=data_files)
Can someone please help me with this.
Thanks,