I cross-posted this on py2exe-users w/o getting help yet.
Yes, I've read the Wiki - http://starship.python.net/crew/theller/moin.cgi/MatPlotLib
and any other pages I could google. I want to package a pylab (aka scipy, aka matplotlib) app. I'm on Win XP. I've been trying for four days. I've boiled it down to this:
···
-----------------------------------------------------
Test.py:
import pylab
a = arange(10)
print a
-----------------------------------------------------
Setup.py:
from distutils.core import setup
import py2exe
import glob
# from py2exe wiki: matplotlib
"""
These don't work so I commented them out:
opts = {
'py2exe': { 'excludes': ['_gtkagg', '_tkagg'],
'dll_excludes': ['libgdk-win32-2.0-0.dll',
'libgobject-2.0-0.dll'],
'includes': ['matplotlib.numerix.random_array'],
}
}
"""
setup(
# This doesn't make it work either:
data_files = [
(r'lib\matplotlibdata', glob.glob(r'c:\python23\share\matplotlib\*')),
(r'lib\matplotlibdata', glob.glob(r'c:\Python23\share\matplotlib\.matplotlibrc')),
],
version = "0.7.0",
description = "test py2exe & pylab",
name = "TestPy2exe",
author = "Michael E Huster",
# targets to build
console = ["test.py"]
)
-----------------------------------------------------
I run:
python setup.py py2exe
cd dist
test.exe
Traceback (most recent call last):
File "test.py", line 1, in ?
File "pylab.pyc", line 1, in ?
File "matplotlib\__init__.pyc", line 509, in ?
File "matplotlib\__init__.pyc", line 245, in wrapper
File "matplotlib\__init__.pyc", line 318, in _get_data_path
RuntimeError: Could not find the matplotlib data files
Michael Huster, Ph. D.
Assistant Professor of Science
Simpson University
2211 College View Dr.
Redding, CA 96003