我在使用Pygame时遇到一个错误。我使用的是Python3.5和PyGame3.2。我今天才开始学习Pygame,它给了我这个错误:
代码:
import pygame
pygame.init()
width, height = 640, 480
screen=pygame.display.set_mode((width, height))
player = pygame.image.load("resources/images/dude.png")
while 1:
screen.fill(0)
screen.blit(player, (100,100))
pygame.display.flip()
for event in pygame.event.get():
if event.type==pygame.QUIT:
pygame.quit()
exit(0)错误:
Traceback (most recent call last):
File "test.py", line 5, in <module>
pygame.init()
AttributeError: module 'pygame' has no attribute 'init'https://stackoverflow.com/questions/38308518
复制相似问题