PyCharm won't import PyGame

前端 未结 2 1559
不思量自难忘°
不思量自难忘° 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:27

    Open your PyCharm project. Go to File->Settings->Project->Project Interpreter. There will be a list of all installed modules on the current python environment you are using. If pygame is not listed there, it hasn't been installed for that PyCharm project (using that python environment).

    You can install it by using PyCharm interface, just click on the + sign and search for pygame and click install.

提交回复
热议问题