将 python pygame 转换为 exe 时出现问题
Problems converting a python pygame into exe
好的,所以我正在尝试将我的 python pygame
游戏转换为 .exe
文件,以便我可以将其发送给朋友,但每次我尝试转换时都会创建.exe
文件但我无法打开它没有标记任何错误并且它没有任何额外的文件
我已经尝试了auto-py-to-exe
和pyinstaller
几乎所有可能的组合
它只使用pygame
、Sys
和random
模块和python of curse
here is a GitHub with the file
我不知道你是否可以告诉我如何转换它或者直接为我转换它
获取py2exe。这个用起来很简单。假设您的主要脚本是 game.py 并且该脚本包含所有其他内容,您需要做的就是准备另一个脚本,我们将其命名为 setup.py 并输入:
from distutils.core import setup import py2exe
setup(console=['game.py'])
现在执行该文件,它将所有内容编译成可执行文件:
python setup.py py2exe
好的,所以我正在尝试将我的 python pygame
游戏转换为 .exe
文件,以便我可以将其发送给朋友,但每次我尝试转换时都会创建.exe
文件但我无法打开它没有标记任何错误并且它没有任何额外的文件
我已经尝试了auto-py-to-exe
和pyinstaller
几乎所有可能的组合
它只使用pygame
、Sys
和random
模块和python of curse
here is a GitHub with the file
我不知道你是否可以告诉我如何转换它或者直接为我转换它
获取py2exe。这个用起来很简单。假设您的主要脚本是 game.py 并且该脚本包含所有其他内容,您需要做的就是准备另一个脚本,我们将其命名为 setup.py 并输入:
from distutils.core import setup import py2exe
setup(console=['game.py'])
现在执行该文件,它将所有内容编译成可执行文件:
python setup.py py2exe