Building Panda3D on Mac: No module named direct.ffi

Hello

I’m building Panda3D on Mac OS X (Leopard) by following this tutorial at: edalytical.com/articles/buil … opard.html
.

It seems to be going ok except for the last step where I have to run: genPyCode and there I get the following error:

Can anyone help please.

Are you in the root of the panda source tree when you executed that command? If you are and it still doesn’t work, try setting your PYTHONPATH to where the direct dir resides.

I’ve tried to locate the file direct.ffi but I can’t find it in /usr/local/panda/ and in my installation directory. Is that normal?

I believe at the genPyCode the “direct” tree gets copied to /usr/local/panda/lib . Am not sure though.
The “direct” dir initially resides in the build directory, where you extracted the Panda3D source, and where the “direct” dir also is. Have you tried running genPyCode while being in that root directory?

You were right the first time. It was a path problem and there is no such file as direct.ffi since i think it’s just python importing the ffi directory from direct.

Now I’ve got a new problem :slight_smile:

This means that the Python interfaces weren’t compiled into Panda when it was built. Most likely ppremake didn’t detect Python properly, either because you don’t have the Python sources installed, or because you have the wrong path to Python configured in your Config.pp file.

When you run ppremake in dtool, make sure it says:

Compilation will generate Python interfaces.

David

Well I do get this message:

when I run ppremake in dtool.

The problem seem to lie in my paths to python 2.5. I seem to have them several places: in /library/… and then in /usr/…

Any advice on how to resolve this

Did you also get that message the first time you ran ppremake? I only ask because it appears that libpandaexpress has already been built without the Python interfaces, so it might be necessary to build it again, now that you have convinced ppremake that you have Python installed.

In particular, if you type “make install” in dtool and then in panda and then in direct, does it do anything?

David