Cx_Freeze exe mit Numpy for Python erstellen

Ich versuche, eine grundlegende exe mit cx_Freeze zu erstellen. Es funktioniert für .py-Programme, die kein numpy haben, aber mit numpy kann ich keines richtig machen.

* Irgendwelche Ideen, wie man das behebt? Gibt es etwas, das ich in meine setup.py aufnehmen muss?

Wenn ich die Exe laufen lasse, heißt es:

<code>           c:\Python32\Scripts\dist>Assignment4_5.exe
           Traceback (most recent call last):
     File "C:\Python32\lib\site-packages\cx_Freeze\initscripts\Console3.py", line 2
     7, in <module>
     exec(code, m.__dict__)
     File "c:\Python32\Assignment4_5.py", line 6, in <module>
     import numpy as np
     File "C:\Python32\lib\site-packages\numpy\__init__.py", line 137, in <module>
     from . import add_newdocs
     File "C:\Python32\lib\site-packages\numpy\add_newdocs.py", line 9, in <module>

     from numpy.lib import add_newdoc
     File "C:\Python32\lib\site-packages\numpy\lib\__init__.py", line 17, in <modul
     e>
    from .npyio import *
    File "C:\Python32\lib\site-packages\numpy\lib\npyio.py", line 6, in <module>
    from . import format
    ImportError: cannot import name format

   c:\Python32\Scripts\dist>
</code>

Setup.py:

<code>   from cx_Freeze import setup, Executable

   includeDependencies = []

   setup(
        name = "Assignment4_5PythonExe",
        version = "0.1",
        description = "Sort Methods",
        executables = [Executable("Assignment4_5.py")]
        )
</code>

Antworten auf die Frage(2)

Ihre Antwort auf die Frage