Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#43 Unable to use Python-Ogre (%1 is not a valid Win32 app.)

1.6.4
closed-accepted
Andy
5
2010-06-01
2010-03-08
Grissess
No

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?)

Discussion

  • Ken Rockot
    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.

     
  • Grissess
    Grissess
    2010-04-29

    Alright, I am unable to try that right now, but that sounds like it will work. Thanks.

     
  • Andy
    Andy
    2010-06-01

    Believe this now works with 1.7.x

     
  • Andy
    Andy
    2010-06-01

    • assigned_to: nobody --> andy_miller
    • status: open --> closed-accepted