0

please can anyone help me to sort out this issue. when i try to import pygame it's not working and giving me this error

# import pygame ImportError: No module named pygame

i'm using python 3.8 and os catalina

Thanks.

THinkER
  • 5
  • 2

1 Answers1

0

If your import statement is # import pygame then remove the # symbol

Open the terminal and run pip install pygame and then try to import pygame

If you are using any virtual environment first activate the virtual environment from the project location and then run the above command

Rajesh Sinha
  • 47
  • 1
  • 8
  • thanks for the reply ! I have done this but still when I try to do it in visual studio code but still giving me the same error. AttributeError: module 'pygame' has no attribute 'init' – THinkER Jun 05 '20 at 06:09