I'm trying to install pygame in my python 2.7. I do it in this python because for some reason if I try to install pip in python 3.7 it won't work. From the terminal I entered:
sudo pip install pygame
And supposedly I installed it well, but when I try to do the import it tells me:
Traceback (most recent call last):
File "example.py", line 1, in <module>
import pygame
ImportError: No module named pygame
if i try to do again sudo pip install pygame
:
Requirement already satisfied: pygame in /home/cesar/.local/lib/python2.7/site-packages (1.9.4)
Also, if I try to run pip list
and look for pygame, it appears that the module is already installed:
pygame 1.9.4
What may be happening? Why does python say that the requirement is already met if it is not able to import the module?