I really need help. I have programmed a GUI in Python, using PyQt5. Now I want to convert my files/file into an .exe file, so you are able to use it without installing Python first.
I'm searching on the Internet for almost three and a half hours now, meanwhile trying to solve my problem, but nothing works. I don't understand the PyInstaller Documentation and no other answered question on the Internet helped me.
I have seven Python files (programmed object orientated). A main program and the modules. How do I manage to make this program work without installing Python (respectively, how do I convert them to .exe?)
I'm using Windows 10, have Python 3.5, PyQt5 and PyInstaller 3.3.1 installed.
Thank you very much for any help!
My .spec file looks like this at the moment:
# -*- mode: python -*-
block_cipher = None
a = Analysis(['MainFile.py', 'module1.py', 'module2.py', 'module3.py', 'module4.py', 'module5.py', 'module6.py'],
pathex=['C:\\Users\\MyName\\Documents\\ProgramFolder'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='MainFile',
debug=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='MainFile')
My Error after running:
Traceback (most recent call last):
File "MainFile.py", line 11, in <module>
File "C:\Users\MyName\AppData\Local\Programs\Python\Python35-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__)
File "module2.py", line 2, in <module>
File "C:\Users\MyName\AppData\Local\Programs\Python\Python35-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module
module = loader.load_module(fullname)
ImportError: DLL load failed: The specified procedure was not found
[11868] Failed to execute script MainFile
pyinstaller -F main.py(replacing main.py with your main .py file, of course) ? PyQt5 seems to be fully supported by pyinstaller, so it is expected to work...