HonzsSedlomn
HonzsSedlomn

Reputation: 236

Why do I have invalid syntax in default pygame.py?

Always, when I want to use Python framework pygame and I want to compile it, it's printing this:

    Traceback (most recent call last):
  File "/home/hanisek/game.py", line 1, in <module>
    import pygame
  File "/home/hanisek/pygame.py", line 3
    03f3 0d0a 5fff 9355 6300 0000 0000 0000
       ^
SyntaxError: invalid syntax

Do you know why?

Upvotes: 1

Views: 142

Answers (1)

Martijn Pieters
Martijn Pieters

Reputation: 1121486

You are not importing pygame the framework, you are importing pygame.py, a file in the same directory:

    import pygame
  File "/home/hanisek/pygame.py", line 3

Remove or rename that file.

Upvotes: 1

Related Questions