Compiling for OS X: ImportError: No module named ffi

Hmm, looks like something about the build of Python you’re running it with, is incompatible with the build of Python that the Panda3D libraries are linked against.

That seems to be what caused the Bus error, anyway.

I am running the default version of python 2.5 that ships with osx snow leopard. Ill try reinstalling 2.5 making sure it’s i386 :frowning:

What you could try is setting the MAIN_DIR environment variable to “.” before running. But that’d probably still make it crash somewhere else.

Awesome! It fully works now. Thank you very much. I will make a doc about this process soon.

There is one strange thing that is still happening tho. If I run the roaming ralph example from
/Developer/Examples/Panda3D/Roaming-Ralph

all works fine. However, if I recursively copy the Roaming-Ralph dir (including the models dir and everything in it) to some other location (dir inside my home dir) the models load, but the textures dont appear, and there are no errors. The textures that example uses are jpegs. Any idea why this would happen? Thanks again.

If I change the code to manually load the texture after the model is loaded, it works fine. Any idea why this could be?

texture = loader.loadTexture(“path/to/file.jpg”)
model.setTexture(texture)

Are you running it from within the roaming ralph directory?

running in the exact same way, from within the roaming ralph dir. like ppython Tut-Roaming-Ralph.py after the export MAIN_DIR="."

In the example the models are loaded without any extension, so adding .egg.pz when loading loads the textures as well (regardless of current dir - still kinda strange)…