I'm a very beginner python programmer. I installed pygame however when I import pygame in spyder, it doesn't work. pip install pygame
The following message prompts. ModuleNotFoundError: No module named 'pygame'
Below is what I wrote so far
import pygame
WIDTH, HEIGHT = 900, 500 WIN = pygame.display.set_mode((WITH, HEIGHT))
def main():
run = True
while run:
for event in pygame.event.get():
#end this while loop
if event.type == pygame.QUIT:
run = False
pygame.quit()