py2exe with pylab

I followed the thread in Sept 2007 that covers the same problem I am having, but it seems to just end without a solution.

I have attached the setup file I am using. When my application is packaged, installed and I try to get my graph I get the following message. The graph works fine while I am working from just the python script in idle.

Traceback (most recent call last):
  File "WxPyETn.py", line 4070, in GetRevGraph
  File "matplotlib\__init__.pyc", line 677, in <module>
  File "matplotlib\__init__.pyc", line 598, in rc_params
  File "matplotlib\__init__.pyc", line 552, in matplotlib_fname
  File "matplotlib\__init__.pyc", line 242, in wrapper
  File "matplotlib\__init__.pyc", line 482, in _get_data_path_cached
  File "matplotlib\__init__.pyc", line 478, in _get_data_path
RuntimeError: Could not find the matplotlib data files

I really try to avoid posting and believe me, I have spent hours trying to figure a solution, but I am just plain ignorant with this and I feel there is a common solution out there someplace.

Ron Adelman, CGFM
Fiscal Consultant
Dept. of Education (SouthWest District)
314 E. Main
Jackson, TN 38301
Phone: 731-927-8787
State Cell: 615-306-4062
Cell: 731-697-0967
Fax: 731-422-1406

setup1.py (1.88 KB)

Had the same problem, solved with the setup.py attached :wink:
Just modify it to fit your needs, should be a good start.
Works under vista + matplotlib 0.98.3
Cheers
Laurent

setup_pylab.py (5.51 KB)

···

-----Message d'origine-----
De : Ron Adelman [mailto:Ron.Adelman@…2163…]
Envoyé : samedi 20 septembre 2008 23:17
À : matplotlib-users@lists.sourceforge.net
Objet : [Matplotlib-users] py2exe with pylab

I followed the thread in Sept 2007 that covers the same problem I am
having, but it seems to just end without a solution.

I have attached the setup file I am using. When my application is
packaged, installed and I try to get my graph I get the following
message. The graph works fine while I am working from just the python
script in idle.

Traceback (most recent call last):
  File "WxPyETn.py", line 4070, in GetRevGraph
  File "matplotlib\__init__.pyc", line 677, in <module>
  File "matplotlib\__init__.pyc", line 598, in rc_params
  File "matplotlib\__init__.pyc", line 552, in matplotlib_fname
  File "matplotlib\__init__.pyc", line 242, in wrapper
  File "matplotlib\__init__.pyc", line 482, in _get_data_path_cached
  File "matplotlib\__init__.pyc", line 478, in _get_data_path
RuntimeError: Could not find the matplotlib data files

I really try to avoid posting and believe me, I have spent hours trying
to figure a solution, but I am just plain ignorant with this and I
feel there is a common solution out there someplace.

Ron Adelman, CGFM
Fiscal Consultant
Dept. of Education (SouthWest District)
314 E. Main
Jackson, TN 38301
Phone: 731-927-8787
State Cell: 615-306-4062
Cell: 731-697-0967
Fax: 731-422-1406