[Numpy-discussion] py2exe issues (was Numpy-discussion Digest, Vol 17, Issue 15)

Steven H. Rogers steve@shrogers....
Fri Feb 8 20:14:04 CST 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




More information about the Numpy-discussion mailing list