[Numpy-discussion] Numpy-discussion Digest, Vol 17, Issue 20

matthew yeomans matthew.yeomans at gmail.com
Mon Feb 11 09:32:06 EST 2008


>
> matthew yeomans wrote:
> > Thanks I been trying to compile a code that uses random,pylab and
> > numpy with py2exe
> > the code of setup.py(compiles mycode.py into mycode.exe) follows
> >
> > #Start here
> > from distutils.core import setup
> > import py2exe
> > import pylab
> > import numpy
> > import glob
> > import scipy
> > import random
> > import os
> >
> > setup( console=['mycode.py'],options={'py2exe':
> > {"skip_archive":1,'packages':['matplotlib','pytz']',}},data_files=[
> matplotlib.get_py2exe_datafiles()])
> >
> > #End here
> >
> > It works well for codes that uses pylab only. But It i add more
> > modules i get trouble
> >
> > Is there any good books on how to use py2exe?
>
> Matthew:
>
> I've only used py2exe with a couple of imports (numpy and os).  You're
> importing an awful lot.  Slimming this down to only import the things
> you really need from each module may help, e.g.
>
> from numpy import foo
> from random import bar
> etc.
>
> # Steve



I tried so, I reduced everything  example

from pylab import plot
from pylab import axis
.... and so on


I think I noticed is that when i call
from numpy import array

it confuses array from numpy to array module.

If there a way how to tell py2exe that it requires array from numpy and not
module array?


thanks for all the help.

Matthew Yeomans
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080211/f1050b97/attachment.html>


More information about the NumPy-Discussion mailing list