[Solved]ImportError: No module named pandac.PandaModules


I’m trying to get started with Panda3D. I am on Linux (fedora core 2) with python 2.3.3 and gcc 3.3.3.

I downloaded the source of 1.2.3, unpacked, went into the panda3d-1.2.3 dir and ran:
makepanda/makepanda.py --everything
No errors reported.

Next I added built/lib (I used absolute paths) to LD_LIBRARY_PATH and built, built/lib to PYTHONPATH.
I start python simply by typing “python” and enter “import direct.directbase.DirectStart” at the prompt. The response I get is:

DirectStart: Starting the game.
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/tmp/panda3d-1.2.3/built/direct/../../direct/src/directbase/DirectStart.py", line 3, in ?
    from direct.showbase import ShowBase
  File "/tmp/panda3d-1.2.3/built/direct/../../direct/src/showbase/ShowBase.py", line 6, in ?
    from pandac.PandaModules import *
ImportError: No module named pandac.PandaModules

trying to locate this pandac.PandaModules, I found a built/pandac dir, but this does not contain anything named PandaModules. There is only a subdir called “input” with several lib*.in files.

Any help is much appreciated!

why dont you start panda with the ppython command like usual? (instead of starting normal python)

I can’t find ppython. I assume it should be in built/bin? In that dir I have:
interrogate interrogate_module make-prc-key parse_file test_interrogate

I suspect that I have an incomplete build for some reason, although I did not get any error running makepanda.

ppython should be installed into your system. at least if you installed as root.
i dont have any ppanda in /build/bin either. but i can call ppython from anywhere because the executable was installed in /usr/bin
try calling ppython in your console, if it doesnt work try to reinstall as root.

Succes! :smiley:

Following your advice I now ran makepanda as root. There are now many more things in built/pandac and built/bin. In the latter dir there now also is ppython. After setting the correct PATH, LD_LIBRARY_PATH and PYTHONPATH I can run the examples using both ppython as well as python.

Thanks a lot for your help!

your’ welcome…
since your problem is solved you might want to edit your first post’s headline from
“ImportError: No module named pandac.PandaModules”
“[Solved]ImportError: No module named pandac.PandaModules”

glad i could help
thomas e