views:

865

answers:

2

Hi,

I just installed PyGame 1.9.1 (onto an existing python 2.6.4). Python and it standard libraries work, however, there is a problem with python even being able to find the pygame modules (correctly).

Traceback (most recent call last):
  File "C:\foo\bar\firstGame.py", line 2, in <module>
    import pygame
  File "C:\python264\lib\site-packages\pygame\__init__.py", line 95, in <module>
    from pygame.base import *
ImportError: DLL load failed: The specified module could not be found.

Why is is this happening? Googling yielded the following responses, which I have tried to no avail:

Anyone out there fixed problems in win + pygame?

Thanks


EDIT: more information added as requested:
- Windows version: Windows Vista (updated regularly)
- Installer used: Windows MSI installers
- Installed for: All users
- Number of files in C:\python264\lib\site-packages\pygame:

  • DLL : 14
  • PYD : 34
  • PY : 19
  • PYC : 1
+1  A: 

Are you sure you have got pygame for Python 2.6? The version for 2.5 wont work and produce this error msg, because the pyd file wont find the python 2.5 dll.

tillsten
yes indeed I am using python 2.6.4
bguiz
how is you pygame installer called?please check if it is: http://pygame.org/ftp/pygame-1.9.1.win32-py2.6.msielse you check the pyd (.dll) files with the dependencywalker to see which kind of dll their are missing.
tillsten
thanks tillsten, when I did a complete wipe of the existing installation, and then reinstalled using this installer, it solved my problem.
bguiz
A: 

To check exactly which DLL's are missing use the CMD like python console. It will show a pop-up message indicating the missing DLL. Pygame works for me.

whatnick
I can run python's console (IDLE) without any popups appearing. How do I trigger this popup message? Like I said, python with its std libraries work fine, but when I import from pygame, the stacktrace (posted in the question) appears.
bguiz
Try the one that says Python Command Line (NOT IDLE) in your list of short cuts.
whatnick
thanks, i've solved the problem using a fresh install of pygame, linked by tillsten.
bguiz