cx_freeze转换为exe后,程序无法运行

问题描述

我的代码在Pycharm中运行良好。但是当它转换为exe时,程序立即关闭,我尝试将其打开。

下面是我在setup.py中的代码

from cx_Freeze import setup,Executable

packages = [
'pygame','pyaudio','wave','time','scipy.io','python_speech_features','os','pickle','ModA',# ModA and ModB is other 2 py I wrote for the program
'ModB'
]
includefiles = ['file.pkl','.\\audio\\']  # i imported a pickle file and a folder with some audio files inside
includes = []
excludes = []


setup(
    name="Project",version="0.1",options={'build_exe': {'excludes': excludes,'packages': packages,'include_files': includefiles}},executables=[Executable(script="Main.py",base=None,icon='confiture.ico',shortcutDir='Desktop')]
)

我将此代码用于另一个程序,它工作正常。请帮助我,我做错了什么。这将是一个很大的帮助。非常感谢〜

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)