PyCharm won't import PyGame

前端 未结 2 1556
不思量自难忘°
不思量自难忘° 2021-01-13 10:04

I\'m fairly new to python and decided to try PyGame only to find it won\'t import.

line 1, in 
    import pygame
ModuleNotFoundError: No module         


        
2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-13 10:18

    I think I solve the problem. I had the same problem as well and the reason is I think you need to specify version and fill in the option before you click the install button in Pycharm. For example my version is 1.9.6 and the option is I fill in the sentences below the Author which is "A community project". This is basically how i solve my problem try to get pygame install in my pycharm. I hope you are having the same problem too.

    So go to : File->Settings->Project->Project Interpreter

    Click the plus button '+' on the top right window Search for pygame and fill in the version and option Install Package It works for me at last!

提交回复
热议问题