0

I am using python 3.8.0. I started out by installing pygame. But when i try to import it it will not import and this is what comes up in my console.

C:\Users\emils\AppData\Local\Programs\Python\Python38\python.exe: can't open file 'game1.py': [Errno 2] No such file or directory

import pygame 
pygame.init() 
win = pygame.display.set_win((500,500))
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • What's the exact code that you are using to import pygame? – Carson McManus Dec 15 '19 at 18:49
  • 2
    This doesn't seem like an issue with importing pygame. It looks like you tried to run the command `python game.py` in your console and it couldn't find the Python script in the current working directory. – bgfvdu3w Dec 15 '19 at 18:51
  • This is the code that i tried to run `import pygame pygame.init() win = pygame.display.set_win((500,500))` – Emil Skjetne Dec 15 '19 at 18:54
  • 2
    The error says nothing about imports. I'm also not sure why you'd install a program under AppData https://stackoverflow.com/questions/1831810/is-appdata-now-the-correct-place-to-install-user-specific-apps-which-modify-t – OneCricketeer Dec 15 '19 at 19:08
  • 1
    Thank you mark, i got it to work – Emil Skjetne Dec 15 '19 at 20:06

0 Answers0