1 Apr 01:12
Re: matplotlib and py2exe
I do not immediately see why the error occurs. Hopefully someone else
can add their input. Off the cuff it seems like matplotlib has not been
installed properly. Can you confirm that import numpy and import
matplotlib works in the interactive python shell.
Cheers
Tommy
[tgrav <at> Thrym] /Users/tgrav --> python
Python 2.4.4 (#1, Oct 18 2006, 10:34:39)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import matplotlib
>>> from matplotlib.numerix import *
>>> random_array
<module 'matplotlib.numerix.random_array' from '/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/numerix/random_array/__init__.pyc'>
>>> numpy.__version__
'1.0.1.dev3436'
>>> matplotlib.__version__
'0.87.7'
>>>
so random_array works fine in my version
On Mar 31, 2007, at 4:26 PM, Archana Ganesan wrote:
Hi all,
The exception I get is
Traceback (most recent call last):
File "App1.py", line 6, in ?
File "Frame1.pyc", line 9, in ?
File "Simulation.pyc", line 16, in ?
File "pylab.pyc", line 1, in ?
File "matplotlib\pylab.pyc", line 199, in ?
File "matplotlib\cm.pyc", line 5, in ?
File "matplotlib\colors.pyc", line 33, in ?
File "matplotlib\numerix\__init__.pyc", line 147, in ?
ImportError: No module named random_array
I have numpy installed in site-packages. The setup.py that I am using is as follows:
Thanks,
Archana.
from distutils.core import setup
import os
from os.path import join
import shutil
import glob
import py2exe
from py2exe.build_exe import py2exe
import sys
import matplotlib
mpdir, mpfiles = matplotlib.get_py2exe_datafiles()
# cleanup dist and build directory first (for new py2exe version)
if os.path.exists("dist/prog"):
shutil.rmtree("dist/prog")
if os.path.exists("dist/lib"):
shutil.rmtree ("dist/lib")
if os.path.exists("build"):
shutil.rmtree("build")
options = {"py2exe": {"compressed": 1,
"optimize": 2,
"packages": ["encodings",
## "kinterbasdb",
"pytz.zoneinfo.UTC",
#" matplotlib.numerix",
## "email",
##"numpy"
## "PIL",
],
"excludes": ["MySQLdb", "Tkconstants", "Tkinter", "tcl",
"orm.adapters.pgsql ", "orm.adapters.mysql"
],
"dll_excludes": ["tcl84.dll", "tk84.dll", "wxmsw26uh_vc.dll"]
}
}
zipfile = r"lib\library.zip"
setup(
classifiers = ["Copyright:: your name",
"Development Status :: 5 Stable",
"Intended Audience :: End User",
"License :: Shareware",
"Operating System :: Microsoft :: Windows 2000",
"Operating System :: Microsoft :: Windows XP",
"Operating System :: Microsoft :: Windows 9x",
"Programming Language :: Python, wxPython",
"Topic :: Home Use"
"Natural Language :: German",
"Natural Language :: French",
"Natural Language :: English"],
# windows = [wx_emb],
#console = [twcb],
options = options,
zipfile = zipfile,
data_files = [("lib\\matplotlibdata", mpfiles),
matplotlib.get_py2exe_datafiles() # if you don't use the lib option
#### ("prog\\amaradata", amaradata),
#### ("prog\\amaradata\\Schemata", amaraschemata),
#### ("prog\\", python4dll)
]
)On 3/31/07, Tommy Grav <tgrav-ee4meeAH724@public.gmane.org> wrote:It is hard to guess what exactly your problem is as you do not provide a codeexample or the traceback call of your exception. I would venture that you aretrying to create a num_array without having Numerix, numpy or numarray importedor installed on your machine.Some more information about your troubles would be needed to really help you out.CheersTommy
On Mar 31, 2007, at 3:50 PM, Archana Ganesan wrote:Hi all,
I have a python application that uses matplotlib.I am trying to compile it into an executable using py2exe. I am encountering "No module named num_array problem". I do not know how to resolve this. I notice that " matplotlib.numerix" is in the included package. Did you encounter this problem. I am very new to this and I have to get it done by tomm. So I am sorry if it is really silly.
Thanks,
Archana.On 3/31/07, Archana Ganesan < archana.ganesan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > wrote:Hi all,
I have a python application that uses matplotlib. I want to compile it into an executable. I tried using py2exe but it returned some error w.rt matplotlib. Cpuld anyone please help me with this? Is there some other way to get it done?
Thanks,
Archana
-------------------------------------------------------------------------Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT & business topics through brief surveys-and earn cashMatplotlib-users mailing list
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@... https://lists.sourceforge.net/lists/listinfo/matplotlib-users
RSS Feed