我似乎无法将py文件转换为EXE

时间:2020-06-05 20:53:22

标签: python cx-freeze

因此,在将基于平台的pygame转换为exe时,我遇到了很多问题。我去过YouTube,浏览器和不和谐服务器。我已经尝试过pyinstaller,py2exe甚至cx_Freeze。我查看了其他帖子并提出了其他建议,但是我的exe继续打开约2秒钟,然后立即再次关闭。我最后一次使用cx_Freeze的尝试是在安装文件中输入以下内容。任何帮助将不胜感激

from cx_Freeze import setup, Executable

additional_modules = []

build_exe_options = {"includes": additional_modules,
                     "packages": ["pygame", "random", "math"],
                     "include_files": ['assets']}

base = None
if sys.platform == "win32":
    base = "Win32GUI"

setup(name="Pyformer",
      version="1.0",
      description="JUMP JUMP JUMP",
      options={"build_exe": build_exe_options},
      executables=[Executable(script="pyformer.py", base=base)])```

0 个答案:

没有答案
相关问题