【发布时间】:2017-06-26 19:46:21
【问题描述】:
我的书中的程序有问题。有简单的我写的代码:
from livewires import games
games.init(screen_width = 640, screen_height = 480, fps = 50)
games.screen.mainloop()
还有错误:
Traceback (most recent call last):
File "/home/adrian/python_project/gra.py", line 3, in <module>
games.init(screen_width = 640, screen_height = 480, fps = 50)
AttributeError: 'module' object has no attribute 'init'
我通过这个命令安装了数据包(我使用的是 Ubuntu):
sudo apt-get install python-pygame
sudo python2.7 setup.py install (I downloaded LiveWires-2.1 and extracted it)
我可以做些什么来运行这个程序?
【问题讨论】: