Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
415 views
in Technique[技术] by (71.8m points)

python - Pygame in Windows: ImportError: DLL load failed

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:fooarfirstGame.py", line 2, in <module>
    import pygame
  File "C:python264libsite-packagespygame\__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:python264libsite-packagespygame:

  • DLL : 14
  • PYD : 34
  • PY : 19
  • PYC : 1
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...