22

I am trying to import Pygame to use for my version of Python, 3.3. The downloads on the Pygame website only have Python 3.1 and 3.2. I cannot seem to be able to import Pygame though I thought I had it installed in the correct path. I have tried both the 3.1 and 3.2 Pygame downloads.

Is Pygame just not installed in the correct file path or is Pygame not compatible with my version of Python (3.3)?

I am running Windows 7 and here is the error:

Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
import pygame
File ".\pygame\__init__.py", line 95, in <module>
from pygame.base import *
ImportError: DLL load failed: The specified module could not be found.
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
ShroomBandit
  • 441
  • 1
  • 5
  • 12

7 Answers7

27

The main Pygame page seems to be rarely updated. You can download Pygame releases direct from Bitbucket at https://bitbucket.org/pygame/pygame/downloads.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Paul Vincent Craven
  • 2,027
  • 3
  • 19
  • 24
  • 1
    For windows, there is this nice repository with even more up-to-date bnaries (as I write this, they have a Pygame installer for Python 3.5 on win 32 and 64bit): http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame – jsbueno Oct 23 '15 at 11:55
4

If the solution from the Paul Vincent Craven's answer gives you "Python version 3.3 required, which was not found in the registry.", you have to download and install this version from the official download site:

Python 3.3.0 Windows X86-64 MSI Installer
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Slobodan Stevic
  • 350
  • 1
  • 5
  • 10
3

If you are on Windows and have Python 3.3, open the download page on bitbucket. Download: pygame-1.9.2a0.win32-py3.3.msi

Then you can test if you have Pygame by importing pygame.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
1

Every time I update my python verion (currently I'm working with python 3.3), I download a special build for pygame, from this adress. It has builds for many other packages, so I think it is worth to check it out.

0

I have had this problem also. Pygame has to be compatible with the version of Python and the type of computer you have. For example, if you have Python version 3.3.2, but downloaded Pygame version 2.7.1, the "import pygame" function will be impossible to use.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
0

You need to download the version of Pygame that is equivalent to Python 3.3 from Bitbucket and Pygame is only available in 32 bit, so you need to make sure that Python is 3.3 32 bit. Download from: https://bitbucket.org/pygame/pygame/downloads

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
user3100799
  • 11
  • 1
  • 4
  • Hi, I tried to verify the existence of a version 3.3 of pygame on bitbucket but couldn't find any. I assume it's just a typo and you mean the Python version number instead. Can you please correct this information and provide a direct link to the correct download page? Thanks! – tiguchi Jan 18 '14 at 17:06
0

sudo apt-get install python-pygame
Raise some errors like 404 for some packages so
https://community.webfaction.com/questions/315/how-do-i-install-pygame
This link help full for me

GrvTyagi
  • 4,231
  • 1
  • 33
  • 40