Several of my own projects, which are separate independent programs, were created by myself after converting the Python file to an exe
file in my own system and virtual machines. I encounter an unknown error that I have not encountered before. The program specifications were created in Python with PyQt5
and converted to an executable .exe
file by cxFreez
. The content of the file is like the example below:
- /Application_Folder
---- /assestFolder
---- /libFolder
---- mainFile.exe
---- file01.exe [or file01.py]
---- file02.exe [or file02.py]
---- file03.exe [or file03.py]
---- media_rc.py # convert and generated from pyrcc5 in pyqt5 tools
---- media.qrc
I also output by default in my system that this problem persisted and I created a new virtual machine (env)
and installed all the required packages in it first and then output by a setup.py
file whose contents are as follows :
import sys
from cx_Freeze import setup, Executable
build_exe_options = {
"packages": ["os", "PyQt5", "Blockthon", "requests", "random"],
"excludes": ["tkinter"],
"bin_includes": ["sip"],
"bin_path_includes": ["./env/Lib/site-packages/PyQt5/Qt/bin/"],
"bin_path_excludes": ["./env/"],
"include_files": ['assestFolder/', 'libFolder/']
}
base = None
if sys.platform == "win32":
base = "Win32GUI"
exe = Executable(
script="mainFile.py",
base=base,
target_name = "mainFile.exe",
target_dir = "output"
)
setup(
name="name_of_your_application",
version="0.1",
description="Your application description",
options={"build_exe": build_exe_options},
executables=[exe]
)