I just recently began learning pygame, but whenever I try to run anything, it always throws up an error. On windows btw
To start I have:
import pygame
pygame.init()
win = pygame.display.set_mode((500,500))
pygame.display.set_caption("First Game")
After this, I have my general program. Whenever I use "pygame."... it throws up an error code in VS code and when I attempt to run the program it says, File "c:/Users/liame/Python Projects/pygame.py", line 1, in import pygame File "c:\Users\liame\Python Projects\pygame.py", line 2, in pygame.init() AttributeError: partially initialized module 'pygame' has no attribute 'init' (most likely due to a circular import)
The directory is: "pythonprojects -> pygame.py" and that's it.
To import it, I've tried, "pip install pygame," and, "py -m pip intall -U pygame --user"
I really need help with this because I can't get anywhere in the meantime