使用Anacoda prompt进行安装
pip install pygame
构建画布
import pygame,sys
from pygame.locals import *
pygame.init()
screen=pygame.display.set_mode((400,300))
while True:
for event in pygame.event.get():
if event.type==QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
print(pygame.ver)