[Numpy-discussion] Compiling Numpy with py2exe

2006-10-12 Thread Charles Hanot








Hello,



Ive a program using Numpy and I would like to compile
it with Py2exe but Ive some problems. When I try to compile my program,
some modules generated by numpy are not loaded. Ive already asked to the
py2exe community if they have a solution for that and the answer was that it
was possible to compile numpy modules with py2exe but I should ask to the Numpy
community J



So my question is, is there something special to do in order
to compile a program using numpy module?



This is the setup.py file that I use





from
distutils.core import setup

import py2exe, sys



sys.path.append(tools)

sys.path.append(report)

sys.path.append(spirent)

sys.path.append(numpydir)



setup(

  console
= ['checkfile.py'],

  )





If I use this setup.py, lots of numpy file cannot be loaded.
I get the following message





copying
c:\python24\lib\site-packages\py2exe\run.exe - Y:\svn\copy\dist\checkfile.exe

The following
modules appear to be missing

['DateTime',
'FFT', 'Ft.Lib', 'Ft.Lib.DumpBgTuple', 'Ft.__init__', 'LinearAlgebra', 'MA',
'MLab', 'Matrix', 'Numeric', 'Pyrex', 'Pyrex.Compiler', 'XPathParserc'

, '_curses',
'backends.draw_if_interactive', 'backends.new_figure_manager',
'backends.pylab_setup', 'backends.show', 'core.abs', 'core.max', 'core.min',
'core.r

ound', 'ctypes',
'ext.IsDOMString', 'ext.SplitQName', 'fcompiler.FCompiler',
'fcompiler.show_fcompilers', 'lib.add_newdoc', 'mlab.amax', 'mlab.amin',
'numarray'

,
'numarray.convolve', 'numarray.fft', 'numarray.ieeespecial',
'numarray.linear_algebra', 'numarray.linear_algebra.mlab', 'numarray.ma',
'numarray.numeric', 'nu

merix.ArrayType',
'numerix.Complex', 'numerix.Complex32', 'numerix.Complex64', 'numerix.Float',
'numerix.Float32', 'numerix.Float64', 'numerix.Int', 'numerix.In

t16',
'numerix.Int32', 'numerix.Int8', 'numerix.NewAxis', 'numerix.UInt16',
'numerix.UInt32', 'numerix.UInt8', 'numerix.absolute', 'numerix.add',
'numerix.all',

'numerix.allclose',
'numerix.alltrue', 'numerix.any', 'numerix.arange', 'numerix.arccos',
'numerix.arccosh', 'numerix.arcsin', 'numerix.arcsinh', 'numerix.arct

an',
'numerix.arctan2', 'numerix.arctanh', 'numerix.argmax', 'numerix.argmin',
'numerix.argsort', 'numerix.around', 'numerix.array', 'numerix.arrayrange',
'nume

rix.asarray',
'numerix.asum', 'numerix.bitwise_and', 'numerix.bitwise_or',
'numerix.bitwise_xor', 'numerix.ceil', 'numerix.choose', 'numerix.clip',
'numerix.com

press',
'numerix.concatenate', 'numerix.conjugate', 'numerix.convolve', 'numerix.cos',
'numerix.cosh', 'numerix.cross_correlate', 'numerix.cumproduct', 'numerix

.cumsum',
'numerix.diagonal', 'numerix.divide', 'numerix.dot', 'numerix.equal',
'numerix.exp', 'numerix.fabs', 'numerix.fft.fft', 'numerix.fft.inverse_fft',
'nu

merix.floor',
'numerix.fmod', 'numerix.fromfunction', 'numerix.fromstring', 'numerix.greater',
'numerix.greater_equal', 'numerix.hypot', 'numerix.identity', 'nu

merix.indices',
'numerix.innerproduct', 'numerix.iscontiguous', 'numerix.isnan',
'numerix.less', 'numerix.less_equal', 'numerix.log', 'numerix.log10', 'numerix.

logical_and',
'numerix.logical_not', 'numerix.logical_or', 'numerix.logical_xor',
'numerix.matrixmultiply', 'numerix.maximum', 'numerix.minimum', 'numerix.mlab.

amax',
'numerix.mlab.amin', 'numerix.mlab.cov', 'numerix.mlab.diff',
'numerix.mlab.hanning', 'numerix.mlab.rand', 'numerix.mlab.std',
'numerix.mlab.svd', 'numer

ix.multiply',
'numerix.negative', 'numerix.newaxis', 'numerix.nonzero', 'numerix.not_equal',
'numerix.nx', 'numerix.ones', 'numerix.outerproduct', 'numerix.pi',

 'numerix.power',
'numerix.product', 'numerix.put', 'numerix.putmask', 'numerix.rank',
'numerix.ravel', 'numerix.repeat', 'numerix.reshape', 'numerix.resize', '

numerix.searchsorted',
'numerix.shape', 'numerix.sin', 'numerix.sinh', 'numerix.size',
'numerix.sometrue', 'numerix.sort', 'numerix.sqrt', 'numerix.subtract', '

numerix.swapaxes',
'numerix.take', 'numerix.tan', 'numerix.tanh', 'numerix.trace',
'numerix.transpose', 'numerix.typecode', 'numerix.typecodes', 'numerix.where'

, 'numerix.which',
'numerix.zeros', 'pre', 'serial', 'setuptools', 'setuptools.command',
'setuptools.command.egg_info', 'setuptools.command.install', 'testing.S

cipyTest',
'win32api', 'win32con', 'win32pdh', 'xml.xslt', 'xml.xslt.ParsedPattern',
'numpy.Complex', 'numpy.Complex32', 'numpy.Complex64', 'numpy.Float', 'nump

y.Float32', 'numpy.Float64',
'numpy.Int', 'numpy.Int16', 'numpy.Int32', 'numpy.Int8', 'numpy.UInt16',
'numpy.UInt32', 'numpy.UInt8', 'numpy.arccos', 'numpy.arcc

osh',
'numpy.arcsin', 'numpy.arcsinh', 'numpy.arctan', 'numpy.arctanh',
'numpy.bitwise_and', 'numpy.bitwise_or', 'numpy.bitwise_xor', 'numpy.ceil',
'numpy.conju

gate',
'numpy.core.add', 'numpy.core.bitwise_and', 'numpy.core.bitwise_or',
'numpy.core.bitwise_xor', 'numpy.core.cdouble', 'numpy.core.complexfloating',
'numpy

.core.conjugate',
'numpy.core.csingle', 'numpy.core.divide', 'numpy.core.double',
'numpy.core.equal', 'numpy.core.float64', 

Re: [Numpy-discussion] Compiling Numpy with py2exe

2006-10-12 Thread Travis Oliphant
Charles Hanot wrote:

 Hello,

 I’ve a program using Numpy and I would like to compile it with Py2exe 
 but I’ve some problems. When I try to compile my program, some modules 
 generated by numpy are not loaded. I’ve already asked to the py2exe 
 community if they have a solution for that and the answer was that it 
 was possible to compile numpy modules with py2exe but I should ask to 
 the Numpy community J

 So my question is, is there something special to do in order to 
 compile a program using numpy module?

The only thing I remember is that you have to explicitly make sure 
_internal.py file gets copied over as it is not possible to discern that 
by looking at the import statements in .py files.

-Travis


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion