我刚刚安装了PyGame 1.9.1(到现有的Python 2.6.4上)。Python和它的标准库可以正常工作,但是存在一个问题,就是Python甚至无法正确地找到pygame模块。
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.
为什么会发生这种情况?谷歌搜索得到以下回复,但均无效:
- http://www.daniweb.com/forums/thread181323.html 我已检查确实可以在
C:\python264\lib\site-packages\pygame
找到base.pyd
- http://www.kelvinsthunderstorm.com/py2exe-and-pygame-dlls/ 问题似乎不仅是缺少某些DLL文件,而是所有DLL文件都缺失
谢谢
EDIT:根据要求添加更多信息:
- Windows版本:Windows Vista(定期更新)
- 使用的安装程序:Windows MSI安装程序
- 安装对象:所有用户
-
C:\python264\lib\site-packages\pygame
中的文件数目:
- DLL:14
- PYD:34
- PY:19
- PYC:1