Skip to content
Advertisement

install pygame module for python2.7

I already installed pygame for Python3 (on windows)
But now I want to run a source code written with Python2.7
It gives this error when I run the code :

ImportError: No module named pygame

how can i use pygame for python2.7?(how can i fix it?)

thanks

Advertisement

Answer

I solved my problem by using pip for different versions of Python

> py -2 -m pip install pygame
> py -3 -m pip install pygame
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement