1

So i've installed pygame and confirmed the installation (aliens example).

I saved my script as pygame.py.

When I try to run my script I get the following error message:

C:\Users\*****>C:/Users/*****/AppData/Local/Programs/Python/Python39/python.exe c:/Users/*****/Downloads/pygame.py
Traceback (most recent call last):
  File "c:\Users\*****\Downloads\pygame.py", line 1, in <module>
    import pygame
  File "c:\Users\*****\Downloads\pygame.py", line 2, in <module>
    from pygame.locals import *
ModuleNotFoundError: No module named 'pygame.locals'; 'pygame' is not a package

Anyone have this issue?

user2314737
  • 27,088
  • 20
  • 102
  • 114

1 Answers1

0
  1. open Powershell
  2. type "pip install pygame"
  3. Hit enter

it will definietly help

Azeem8869786
  • 109
  • 9