After downloading and extracting Python-Ogre 1.6.4 to my desktop, and running "C:\Python26\python.exe setup.py install" from the extracted directory, I am unable to use (at least) ogre.renderer.OGRE because "IImportError: DLL load failed: %1 is not a valid Win32 application." I am running Python 2.6.4 on Windows Vista x64 (I think Premium). According to PythonWin, which I used to test this error, my exact Python revision is:
PythonWin 2.6.4 (r264:75708, Oct 26 2009, 07:36:50) [MSC v.1500 64 bit (AMD64)] on win32.
The full traceback when executing ">>> import ogre.renderer.OGRE" at the interactive prompt is:
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python26\lib\site-packages\ogre\renderer\OGRE\__init__.py", line 10, in <module>
from _ogre_ import *
ImportError: DLL load failed: %1 is not a valid Win32 application.
(could this possibly have to do with my x64 system?)
Ken Rockot
2010-04-28
This is a result of trying to load the Python-Ogre binaries (built for x86) within a 64-bit Python environment. Installing 32-bit Python should resolve this issue.