0
我的書有一個程序問題。這裏簡直就是我寫的代碼:python 2.7 livewires - 'module'對象沒有任何屬性'init'
from livewires import games
games.init(screen_width = 640, screen_height = 480, fps = 50)
games.screen.mainloop()
和錯誤:
sudo apt-get install python-pygame
sudo python2.7 setup.py install (I downloaded LiveWires-2.1 and extracted it)
我能做些什麼來:
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)安裝包運行這個程序?
[Python AttributeError:'module'object has no attribute'init']可能重複(http://stackoverflow.com/questions/7034210/python-attributeerror-module-object-has-no-attribute-init) – RafaelC