0

I'm just trying to build some Python game, but import pygame is not working.

I got this error massage:

/usr/bin/python3 /home/dinushi/g.py/snackgame.py
Traceback (most recent call last):
  File "/home/dinushi/g.py/snackgame.py", line 2, in <module>
    import pygame
ModuleNotFoundError: No module named 'pygame'
Eliah Kagan
  • 119,640

1 Answers1

1

You need to install the pygame module (no need to use sudo):

pip3 install --user pygame

Another way to install is by sudo apt-get install python3-pygame

ajgringo619
  • 1,243