Import Error, not valid win32 app?

I’ve been trying to test out how the tutorial asteroids game works, and when i try to run it on my own version of python (2.7), it gives me this error:

ImportError: DLL load failed: %1 is not a valid Win32 application.

What exactly does this mean? and is there anyway to either avoid or fix it?

Which version of Panda3D are you using? Are you using 32-bits or 64-bits Python?

I’m using panda3d v1.7.2. But I don’t know what version python I’m using. how can i check?

Checking whether “sys.maxint” returns 2147483647 or 9223372036854775807 would be a good indicator.

Indeed it is a 64 bit python.

Then that explains why it won’t work. Panda3D is currently only provided for 32-bits, and you cannot load 32-bits modules in a 64-bits version of Python.

However, Panda 1.8 ships with its own build of Python 2.7 32-bits, which you can simply use instead, by running “ppython” to ensure you’re using Panda’s copy.

Ah I didn’t notice that ppython was different from python. running the stuff in ppython worked, thanks!

(I thought i read somewhere that panda automatically detects 32 and 64 bit, guess i was mistaken)

thanks for your help!