python – ImportError: No module named pygame

python – ImportError: No module named pygame

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

C:python34scripts> python -m pip install pygame

To test it, open python IDE and type

import pygame

print (pygame.ver)

It worked for me…

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.

python – ImportError: No module named pygame

I was trying to figure this out for at least an hour. And youre right the problem is that the installation files are all for 32 bit.

Luckily I found a link to the 64 pygame download! Here it is:

Just pick the corresponding version according to your python version and it should work like magic. The installation feature will bring you to a bright-blue screen as the installation (at this point you know that the installation is correct for you.

Then go into the Python IDLE and type import pygame and you should not get any more errors.

Props go to @yuvi who shared the link with StackOverflow.

Leave a Reply

Your email address will not be published.