View Full Version : Python 2.5.1 library problems under Vista x64

06-06-2007, 10:24 PM
I installed Python 2.5.1 and added C:\Python25 to my path environment variable. Running "python" from command line works as it should. However when I tried to install pygame or numeric (I wasn't sure if pygame 1.7.1 for python 2.5 required numpy) the installers gave me errors. These were sorted by running them "as administrator". However, when I try and import anything I get DLL errors such as this:
Python 2.5.1 (r251:54863, Apr 18 2007, 09:02:36) [MSC v.1400 64 bit (AMD64)] on
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python25\lib\site-packages\pygame\__init__.py", line 75, in <module>
from pygame.base import *
ImportError: DLL load failed with error code 193
>>>Does anyone else get any of these problems or have an idea on how to resolve them?

EDIT: running python as administrator and/or adding C:\Python25\lib\site-packages\pygame\ (where SDL.dll is located) to the PATH did not solve the problem. I also get the same problem in eclipse using pydev. The DLL error code is always 193.

04-22-2008, 06:02 PM
I have the same problem though I can't figure how to solve it, really anoying.:confused:

04-22-2008, 06:29 PM
Pygame does not work at all under Windows x64. Maybe it will if you compile it yourself with an x64 compiler, I don't know. It's a problem with pygame rather than a problem with Windows or Python. They just don't care about 64 bit Windows users. A similar situation is 64 bit php for Windows.

Anyway, the easiest solution is to use the 32 bit version of Python and the 32 bit version of pygame (or some other python library) even if you use 64 bit windows.

That being said, if you don't have this problem, stick to the 64 bit version.