Pyinstaller, was mache ich falsch?

Wenn du dir nicht sicher bist, in welchem der anderen Foren du die Frage stellen sollst, dann bist du hier im Forum für allgemeine Fragen sicher richtig.
Antworten
The Spirit
User
Beiträge: 276
Registriert: Freitag 8. Juni 2007, 08:50
Wohnort: 84xxx Bereich
Kontaktdaten:

HI.
Bekomme folgende Fehlermeldung:

Code: Alles auswählen

E:\workspace_1\detector_examination\dist\main>main.exe
LOADER: executable is E:\WORKSP~2\DETECT~1\dist\main\main.exe
LOADER: homepath is E:\WORKSP~2\DETECT~1\dist\main
LOADER: _MEIPASS2 is NULL
LOADER: archivename is E:\WORKSP~2\DETECT~1\dist\main\main.exe
LOADER: No need to extract files to run; setting extractionpath to homepath
LOADER: Already in the child - running user's code.
LOADER: manifestpath: E:\WORKSP~2\DETECT~1\dist\main\main.exe.manifest
LOADER: Activation context created
LOADER: Activation context activated
LOADER: Python library: E:\WORKSP~2\DETECT~1\dist\main\python27.dll
LOADER: Manipulating evironment
LOADER: PYTHONPATH=E:\WORKSP~2\DETECT~1\dist\main
LOADER: PYTHONHOME=E:\WORKSP~2\DETECT~1\dist\main
LOADER: Manipulating Python's sys.path
LOADER: importing modules from CArchive
LOADER: extracted struct
LOADER: extracted pyi_os_path
LOADER: extracted pyi_archive
LOADER: extracted pyi_importers
LOADER: Installing import hooks
LOADER: out00-PYZ.pyz
LOADER: Running scripts
Traceback (most recent call last):
  File "<string>", line 22, in <module>
  File "c:\python27\lib\site-packages\PyInstaller-2.1.1dev_-py2.7.egg\PyInstalle
r\loader\pyi_importers.py", line 276, in load_module
    exec(bytecode, module.__dict__)
  File "E:\workspace_1\detector_examination\build\main\out00-PYZ.pyz\examination
", line 13, in <module>
  File "c:\python27\lib\site-packages\PyInstaller-2.1.1dev_-py2.7.egg\PyInstalle
r\loader\pyi_importers.py", line 276, in load_module
    exec(bytecode, module.__dict__)
  File "E:\workspace_1\detector_examination\build\main\out00-PYZ.pyz\matplotlib.
pyplot", line 27, in <module>
  File "c:\python27\lib\site-packages\PyInstaller-2.1.1dev_-py2.7.egg\PyInstalle
r\loader\pyi_importers.py", line 276, in load_module
    exec(bytecode, module.__dict__)
  File "E:\workspace_1\detector_examination\build\main\out00-PYZ.pyz\matplotlib.
colorbar", line 34, in <module>
  File "c:\python27\lib\site-packages\PyInstaller-2.1.1dev_-py2.7.egg\PyInstalle
r\loader\pyi_importers.py", line 276, in load_module
    exec(bytecode, module.__dict__)
  File "E:\workspace_1\detector_examination\build\main\out00-PYZ.pyz\matplotlib.
collections", line 27, in <module>
  File "c:\python27\lib\site-packages\PyInstaller-2.1.1dev_-py2.7.egg\PyInstalle
r\loader\pyi_importers.py", line 276, in load_module
    exec(bytecode, module.__dict__)
  File "E:\workspace_1\detector_examination\build\main\out00-PYZ.pyz\matplotlib.
backend_bases", line 56, in <module>
  File "c:\python27\lib\site-packages\PyInstaller-2.1.1dev_-py2.7.egg\PyInstalle
r\loader\pyi_importers.py", line 276, in load_module
    exec(bytecode, module.__dict__)
  File "E:\workspace_1\detector_examination\build\main\out00-PYZ.pyz\matplotlib.
textpath", line 19, in <module>
  File "c:\python27\lib\site-packages\PyInstaller-2.1.1dev_-py2.7.egg\PyInstalle
r\loader\pyi_importers.py", line 276, in load_module
    exec(bytecode, module.__dict__)
  File "E:\workspace_1\detector_examination\build\main\out00-PYZ.pyz\matplotlib.
font_manager", line 57, in <module>
  File "c:\python27\lib\site-packages\PyInstaller-2.1.1dev_-py2.7.egg\PyInstalle
r\loader\pyi_importers.py", line 420, in load_module
    module = imp.load_module(fullname, fp, filename, self._c_ext_tuple)
ImportError: DLL load failed: %1 ist keine zulõssige Win32-Anwendung.
LOADER: RC: -1 from main
LOADER: OK.
LOADER: Deactivating activation context
LOADER: Releasing activation context
LOADER: Done
LOADER: Cleaning up Python interpreter.

E:\workspace_1\detector_examination\dist\main>
Das spec-file sieht so aus:

Code: Alles auswählen

# -*- mode: python -*-

block_cipher = None


a = Analysis(['main.py'],
             pathex=['E:\\workspace_1\\detector_examination'],
             hiddenimports=[],
             hookspath=None,
             runtime_hooks=None,
             excludes=['PyQt4'],
             cipher=block_cipher)
pyz = PYZ(a.pure,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          exclude_binaries=True,
          name='main.exe',
          debug=True,
          strip=None,
          upx=True,
          console=True )
coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=None,
               upx=True,
               name='main')
Ich hoffe mir kann hier jemand helfen.
Danke,
Andreas
Sirius3
User
Beiträge: 17741
Registriert: Sonntag 21. Oktober 2012, 17:20

@The Spirit: Du hast ein 64bit Python und irgendwo ein 32bit externes Modul importiert oder umgekehrt. Eigentlich hätte das schon beim Installieren von Matplotlib Probleme geben müssen. Oder hast Du gar nicht installiert sondern nur kopiert?
The Spirit
User
Beiträge: 276
Registriert: Freitag 8. Juni 2007, 08:50
Wohnort: 84xxx Bereich
Kontaktdaten:

HI.
Habe kein 64bit python.
Konnte den Fehler jetzt auf matplotlib eingrenzen.
Jetzt habe ich aber einen neuen Fehler, den ich nicht deuten kann.

Code: Alles auswählen

E:\workspace_1\detector_examination\dist>main.exe
WARNING: file already exists but should not: C:\Users\awilhelm\AppData\Local\Tem
p\_MEI72242\include\pyconfig.h
Traceback (most recent call last):
  File "<string>", line 22, in <module>
  File "c:\python27\lib\site-packages\PyInstaller-2.1.1dev_-py2.7.egg\PyInstalle
r\loader\pyi_importers.py", line 276, in load_module
    exec(bytecode, module.__dict__)
  File "E:\workspace_1\detector_examination\build\main\out00-PYZ.pyz\examination
", line 15, in <module>
  File "c:\python27\lib\site-packages\PyInstaller-2.1.1dev_-py2.7.egg\PyInstalle
r\loader\pyi_importers.py", line 276, in load_module
    exec(bytecode, module.__dict__)
  File "E:\workspace_1\detector_examination\build\main\out00-PYZ.pyz\matplotlib.
pyplot", line 109, in <module>
  File "E:\workspace_1\detector_examination\build\main\out00-PYZ.pyz\matplotlib.
backends", line 32, in pylab_setup
  File "c:\python27\lib\site-packages\PyInstaller-2.1.1dev_-py2.7.egg\PyInstalle
r\loader\pyi_importers.py", line 276, in load_module
    exec(bytecode, module.__dict__)
  File "E:\workspace_1\detector_examination\build\main\out00-PYZ.pyz\matplotlib.
backends.backend_tkagg", line 7, in <module>
  File "E:\workspace_1\detector_examination\build\main\out00-PYZ.pyz\six", line
194, in load_module
  File "E:\workspace_1\detector_examination\build\main\out00-PYZ.pyz\six", line
108, in _resolve
  File "E:\workspace_1\detector_examination\build\main\out00-PYZ.pyz\six", line
79, in _import_module
ImportError: No module named FileDialog

E:\workspace_1\detector_examination\dist>
BlackJack

@The Spirit: Wenn ich mal raten müsste hast Du das `six`-Modul als Abhängigkeit und das importiert ja teilweise in Abhängigkeit von der verwendeten Python-Version unterschiedliche Module, und die sind nicht bei jeder Python-Version vorhanden. Oder anders gesagt das hat Importe die garantiert unter der verwendeten Python-Version *nicht* vorhanden sind. Davon weiss PyInstaller nichts und sucht anscheinend auch nach solchen Modulen — und findet die natürlich nicht.
Antworten