How to import pygame.locals successfully

后端 未结 4 1133
[愿得一人]
[愿得一人] 2021-01-17 01:21

Hello there Stackoverflowers,

I am learning how to program with Pygame and I am trying to import pygame.locals According to the tutorial I am learning from, I am sta

4条回答
  •  轮回少年
    2021-01-17 02:13

    yes @Bartlomiej Lewandowski, you were right.I also faced the same problem and came here to resolve it. I did not download any newer version as apt-get install was giving the message that this is the newest version.

    I just renamed my file pygame.py to some other random name. It is working fine now. So the problem was we named our file as pygame.py, Which is restricted in pygame module, I am not sure. But its working fine now.

    Thanks Bartlomiej Lewandowski once again.

提交回复
热议问题