Ich wollte eine Anwendung mit py2exe freezen, allerdings kann ich die Anwendung anschliessend nicht starten. (verwende py2exe für python 2.5)
Das Hauptmodul erstellt nur ein wx.App Objekt und ruft das Mainfenster auf. Wenn ich dieses Script zum freezen angebe, achtet py2exe anscheinend nicht auf die imports die andere Scripts haben. Darum bekomme ich immer den Fehler
Code: Alles auswählen
Traceback (most recent call last):
File "fmain.py", line 10, in <module>
import createdb
File "C:\Dokumente und Einstellungen\rem.KWSOFT1\Desktop\Finanz\dist\src\createdb.py", line 13, in <module>
import sqlbase
File "C:\Dokumente und Einstellungen\rem.KWSOFT1\Desktop\Finanz\dist\src\sqlbase.py", line 14, in <module>
import sqlite3 # Ab Python 2.5
ImportError: No module named sqlite3
Code: Alles auswählen
setup(
options = options,
# The lib directory contains everything except the executables and the python dll.
zipfile = zipfile,
windows = [test_wx],
data_files =lang,
# use out build_installer class as extended py2exe build command
cmdclass = {"py2exe": build_installer},
)
Code: Alles auswählen
test_wx=dict(
script = ".\\src\\fmain.py",
other_resources = [(RT_MANIFEST, 1, manifest_template % dict(prog="Crown Finanz Manager"))],
icon_resources= [(1, ".\\files\\images\\files_edit.ico")],
dest_base = r"Crown Finanz Manager")
zipfile = r"lib\shardlib"
options = {"py2exe": {"optimize": 2}}