Livewires+游戏E

2024-06-15 01:21:22 发布

您现在位置:Python中文网/ 问答频道 /正文

所以我运行的是安装了python3.3的windows8。我安装了livewires和pygame。在

但当我运行代码时:

from livewires import games

games.init(screen_width = 640, screen_height = 480, fps = 50)

games.screen.mainloop()

我有个错误说。。。重要错误:没有模块名称'游戏机.image'. 在

有人知道怎么解决这个问题吗?在


Tags: 模块代码fromimportinit错误widthscreen
2条回答

如果您阅读了发行版模块目录中的README.md file,您将看到它是在2013年9月25日提交的,并特别声明:

You will need Python to use the package. Python can be obtained from: http://www.python.org/download/. If you're installing for the first time, we recommend you use Python 2.2.3

我认为livewires很可能无法与python3一起工作。在

你在python解释器的文件目录中安装了pygame吗?但无论如何,pygame目前还不能用于python3.3。如果您想使用Python3进行编码,我建议使用3.1.1或3.2,并使用Python2.7.12用pyinstaller将它们编译成.exe文件,因为pip与3.1.1和3.2不兼容。您也可以用python2编写代码。我建议2.7.12

相关问题 更多 >