I've installed pygame Successfully from command prompt and the message was this :
Collecting pygame Using cached pygame-2.1.2-cp310-cp310-win_amd64.whl (8.4 MB) Installing collected packages: pygame Successfully installed pygame-2.1.2
and when I import pygame in vs code and run the code it doesnt give me an error
my problem is when I write a simple code using pygame it gives me errors
code:
import pygame
pygame.init()
screen = pygame.display.set_mode((800,400))
and when I run this code it gives me this :
Traceback (most recent call last): File "c:\Users\itsae\Documents\Phyton\pygame\pygame.py", line 1, in import pygame File "c:\Users\itsae\Documents\Phyton\pygame\pygame.py", line 3, in pygame.init() AttributeError: partially initialized module 'pygame' has no attribute 'init' (most likely due to a circular import)
my python version : 3.10.4