2016-06-23 16 views
0

ich PyInstaller bin mit der Python-Datei mit der enthaltenen Module zu einer ausführbaren Datei mit folgendem Befehl konvertieren: pyinstaller --onedir --onefile --name=IFSCP "C:\Python27\main.py" Ich bin nicht Präfix - Fenstered, weil das Python-Programm im Konsolenmodus ist.Import: DLL lädt fehlgeschlagen (PyCrypto-2.6.1)

Alles ging gut mit dem Kompilieren, aber es gibt ein Problem beim Öffnen der ausführbaren Datei. Der folgende Fehler aufkommt durch die ausführbare Datei geladen wird:

Traceback (most recent call last): 
File "main.py", line 13 in <module> 
File "C:\Users\Youri Kool\Desktop\pyinstaller-pyinstaller-8689a5d\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module 
    exec(bytecode, module, __dict__) 
File "c:\users\yourik~1\appdata\local\temp\easy_install-gzievh\pycrypto-2.6.1-py2.7-win32.egg.tmp\Crypto\Cipher\AES.py", line 50, in <module> 
File "C:\Users\Youri Kool\Desktop\pyinstaller-pyinstaller-8689a5d\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module 
    exec(bytecode, module, __dict__) 
File "c:\users\yourik~1\appdata\local\temp\easy_install-gzievh\\pycrypto-2.6.1-py2.7-win32.egg.tmp\Crypto\Cipher\_AES.py", line 7 in <module> 
File "c:\users\yourik~1\appdata\local\temp\easy_install-gzievh\\pycrypto-2.6.1-py2.7-win32.egg.tmp\Crypto\Cipher\_AES.py", line 6 in __bootstrap__ 

Import: DLL Last fehlgeschlagen: Kan opgegeven Modul niet liefern.

Das Modul ist nicht verfügbar. -> nicht gefunden Modul

Der Import Sie zeigen nicht ohne die from Crypto.Cipher import AES im Skript.

Debug-Info:

C:\Users\Youri Kool\Desktop\pyinstaller-pyinstaller-8689a5d\IFSCP\dist>IFSCP.exe 

PyInstaller Bootloader 3.x 
LOADER: executable is C:\Users\Youri Kool\Desktop\pyinstaller-pyinstaller-8689a5 
d\IFSCP\dist\IFSCP.exe 
LOADER: homepath is C:\Users\Youri Kool\Desktop\pyinstaller-pyinstaller-8689a5d\ 
IFSCP\dist 
LOADER: _MEIPASS2 is NULL 
LOADER: archivename is C:\Users\Youri Kool\Desktop\pyinstaller-pyinstaller-8689a 
5d\IFSCP\dist\IFSCP.exe 
LOADER: Extracting binaries 
LOADER: Executing self as child 
LOADER: set _MEIPASS2 to C:\Users\YOURIK~1\AppData\Local\Temp\_MEI60522 
LOADER: Setting up to run child 
LOADER: Creating child process 
LOADER: Waiting for child process to finish... 
PyInstaller Bootloader 3.x 
LOADER: executable is C:\Users\Youri Kool\Desktop\pyinstaller-pyinstaller-8689a5 
d\IFSCP\dist\IFSCP.exe 
LOADER: homepath is C:\Users\Youri Kool\Desktop\pyinstaller-pyinstaller-8689a5d\ 
IFSCP\dist 
LOADER: _MEIPASS2 is C:\Users\YOURIK~1\AppData\Local\Temp\_MEI60522 
LOADER: archivename is C:\Users\Youri Kool\Desktop\pyinstaller-pyinstaller-8689a 
5d\IFSCP\dist\IFSCP.exe 
LOADER: SetDllDirectory(C:\Users\YOURIK~1\AppData\Local\Temp\_MEI60522) 
LOADER: Already in the child - running user's code. 
LOADER: manifestpath: C:\Users\YOURIK~1\AppData\Local\Temp\_MEI60522\IFSCP.exe.m 
anifest 
LOADER: Activation context created 
LOADER: Activation context activated 
LOADER: Python library: C:\Users\YOURIK~1\AppData\Local\Temp\_MEI60522\python27. 
dll 
LOADER: Loaded functions from Python library. 
LOADER: Manipulating environment (sys.path, sys.prefix) 
LOADER: sys.prefix is C:\Users\YOURIK~1\AppData\Local\Temp\_MEI60~1 
LOADER: Setting runtime options 
LOADER: Bootloader option: pyi-windows-manifest-filename IFSCP.exe.manifest 
LOADER: Initializing python 
LOADER: Overriding Python's sys.path 
LOADER: Post-init sys.path is C:\Users\YOURIK~1\AppData\Local\Temp\_MEI60522 
LOADER: Setting sys.argv 
LOADER: setting sys._MEIPASS 
LOADER: importing modules from CArchive 
LOADER: extracted struct 
LOADER: callfunction returned... 
LOADER: extracted pyimod01_os_path 
LOADER: callfunction returned... 
LOADER: extracted pyimod02_archive 
LOADER: callfunction returned... 
LOADER: extracted pyimod03_importers 
LOADER: callfunction returned... 
LOADER: Installing PYZ archive with Python modules. 
LOADER: PYZ archive: out00-PYZ.pyz 
LOADER: Running pyiboot01_bootstrap.py 
LOADER: Running pyi_rth_pkgres.py 
LOADER: Running pyi_rth__tkinter.py 
LOADER: Running main.py 
Traceback (most recent call last): 
    File "main.py", line 13, in <module> 
    File "C:\Users\Youri Kool\Desktop\pyinstaller-pyinstaller-8689a5d\PyInstaller\ 
loader\pyimod03_importers.py", line 389, in load_module 
    exec(bytecode, module.__dict__) 
    File "c:\users\yourik~1\appdata\local\temp\easy_install-gzievh\pycrypto-2.6.1- 
py2.7-win32.egg.tmp\Crypto\Cipher\_AES.py", line 7, in <module> 
    File "c:\users\yourik~1\appdata\local\temp\easy_install-gzievh\pycrypto-2.6.1- 
py2.7-win32.egg.tmp\Crypto\Cipher\_AES.py", line 6, in __bootstrap__ 
ImportError: DLL load failed: Kan opgegeven module niet vinden. 
Failed to execute script main 
LOADER: OK. 
LOADER: Cleaning up Python interpreter. 
LOADER: Back to parent (RC: -1) 
LOADER: Doing cleanup 
LOADER: Freeing archive status for C:\Users\Youri Kool\Desktop\pyinstaller-pyins 
taller-8689a5d\IFSCP\dist\IFSCP.exe 

Ich installierte die folgenden Anwendungen:

  • pywin32 Version 220
  • cx-Freeze-Version 4.3.4
  • PyCrypto Version 2.6.1

Pyinstaller py Installer-Pyinstaller-8689a5d (Entwickler) und PyInstaller-3.2, die den gleichen Fehler geben.

Antwort

-1

Ich ersetzte from Crypto.Cipher import AES durch import Crypto. Dann im Code:

something = Crypto.Cipher.AES.new(...) 

Und meine Exe hat gut funktioniert

Verwandte Themen