我用 Python 2.6 制作了一个游戏。我还使用 cx_Freeze 4.3 将它变成了可执行文件。当我在我的计算机上运行可执行文件时,它想出了这个:
Microsoft Visual C++ Runtime Library
Program: C:\Users\smm\Desktop\asteroid shower 1.4.5\asteroid.exe
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Run Code Online (Sandbox Code Playgroud)
我不明白这里发生了什么。我试图解决这个问题,但没有运气。然后我在谷歌上搜索了运行时错误,它说可能是兼容性问题。我在 windows vista 上用下载的 windows 7 python 2.6 版本编写了原始脚本。我这样做是因为 windows vista 没有互联网,所以我在 windows 7 笔记本电脑上下载了 python、pygame 和 cx_freeze .msi 文件。然后我将文件传输到桌面 windows vista。这是问题吗?或者可能是脚本?我不认为它是脚本,因为当它仍然是 python 脚本时我可以玩游戏。虽然它有点长......我使用python 2.6,pygame 2.6和cx_freeze 4.3运行Windows 7。谢谢你,如果你能帮助我:)。
# By Sandy Goetjens
# Asteroid Shower V1.4.5
import pygame, random, sys, time
from …
Run Code Online (Sandbox Code Playgroud)