Why does it say that module pygame has no init member?

前端 未结 14 1121
予麋鹿
予麋鹿 2020-12-01 13:57

This is the code I have:

import pygame
pygame.init()

I\'m very confused because if I try to run the file, then there seems to be no issue,

相关标签:
14条回答
  • 2020-12-01 14:43

    I just wrote like this!

    from pygame import * #this will import everything inside the pygame module
    import pygame
    

    Now I'm not getting any errors in vscode.

    0 讨论(0)
  • 2020-12-01 14:45

    I had the same problem while doing it in Vscode but it somehow resolved when i ran the python file from pc terminal . not the terminal in Vscode

    0 讨论(0)
提交回复
热议问题