packaging python for install.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • J

    #1

    packaging python for install.

    Hi everyone,


    I have posted a question on this topic before and already received some
    useful advice. I am basically trying to package python with
    an App that embedds the interpretor. I am also including numarray (i.e.
    I have a #include <numarray/arrayobject.h> in my C++ code). However it
    looks like I have problems with numarray.

    I have run the following:
    [color=blue][color=green]
    >>python setup.py py2exe --includes numarray[/color][/color]

    where
    [color=blue]
    >setup.py contains
    >
    >from distutils.core import setup
    >import py2exe
    >
    >setup()[/color]

    This produced the 'dist' directory including the library.zip file.
    However there was also the following error message:
    [color=blue]
    >The following modules appear to be missing
    >['numarray._dotb las'][/color]

    I renamed library.zip to python24.zip and changed the registry entry
    PythonDir to c:\python24\dis t... Then I started my app again. It seems
    that native python (i.e. PyType_READY) worked fine, but a call to
    numarray function PyArray_FromDim sAndData just crashes the App without
    an error message.

    I have also tried using
    [color=blue][color=green]
    >>python setup.py py2exe -p numarray[/color][/color]

    without success. Has anyone packaged numarray before... any advice ?


    Cheers
    Jochen

  • J

    #2
    Re: packaging python for install.

    Hi


    I found the solution to problem and I just want to document it for the
    next guy. I
    did not copy the content of the 'dist' directory created by Py2exe to
    the folder containing my executable.

    Changing HKEY_LOCAL_MACH INE\SOFTWARE\Py thonCore\<versi on>. alone
    did not work for me... maybe I should have found and changed PYTHONPATH
    as
    well :) Anyways, now I have a solution.

    thx for all the help

    Comment

    Working...