close

[Solved] ImportError: No module named ‘pygame’

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error ImportError: No module named ‘pygame’ in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How ImportError: No module named ‘pygame’ Error Occurs?

Today I get the following error ImportError: No module named ‘pygame’ in python.

How To Solve ImportError: No module named ‘pygame’ Error ?

  1. How To Solve ImportError: No module named 'pygame' Error ?

    To Solve ImportError: No module named 'pygame' Error Here are instructions for users with the newer Python 3.5 (Google brought me here, I suspect other 3.5 users might end up here as well):

  2. ImportError: No module named 'pygame'

    To Solve ImportError: No module named 'pygame' Error Here are instructions for users with the newer Python 3.5 (Google brought me here, I suspect other 3.5 users might end up here as well):

Solution 1


go to python/scripts folder, open a command window to this path, type the following:

C:\python34\scripts> python -m pip install pygame

To test it, open python IDE and type

import pygame

print (pygame.ver)

It worked for me…

Solution 2

Here are instructions for users with the newer Python 3.5 (Google brought me here, I suspect other 3.5 users might end up here as well):

I just successfully installed Pygame 1.9.2a0-cp35 on Windows and it runs with Python 3.5.1.

  • Install Python, and remember the install location
  • Go here and download pygame-1.9.2a0-cp35-none-win32.whl
  • Move the downloaded .whl file to your python35/Scripts directory
  • Open a command prompt in the Scripts directory (ShiftRight click in the directory > Open a command window here)
  • Enter the command:pip3 install pygame-1.9.2a0-cp35-none-win32.whl
  • If you get an error in the last step, try:python -m pip install pygame-1.9.2a0-cp35-none-win32.whl

And that should do it. Tested as working on Windows 10 64bit.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read