Hello!
I have finally managed to compile Panda3d, but I don’t know where I am going to put the compiled files. Can someone tell me? I am using ubuntu 7.04
Thanks!
Hello!
I have finally managed to compile Panda3d, but I don’t know where I am going to put the compiled files. Can someone tell me? I am using ubuntu 7.04
Thanks!
aQ, I also run Ubuntu (actually Kubuntu). It depends on how you want to run the software, but I decided that it would be simplest for me to avoid potential package conflicts (since Panda3D includes a lot of executables, and in one case, “dcraw”, there is actually a potential naming conflict.
What I did is just leave the build output in its own directory and then create a script to run Panda programs. My scripts look like this (this example runs the port of the nVidia nature demo):
#!/usr/bin/sh
# built using makepanda
PATH=/home/matt/panda3d-1.3.2/built/bin:$PATH
LD_LIBRARY_PATH=/home/matt/panda3d-1.3.2/built/lib:$LD_LIBRARY_PATH
export PATH
export LD_LIBRARY_PATH
cd Demo-Nature-2
ppython Demo-Nature.py
This works well for running applications, though it is a bit tedious for using the included utilities like converters or the viewer.
Thanks. Do you run this script in the terminal, or in a .py file?
none of both. put that in a file without extension, go to a terminal, do a chmod 755 yourfile, then type ./yourfile.
Ok. when I run it, I get this error:
bash: ./script: /usr/bin/sh: bad interpreter: No such file or directory
Any ideas?
UPDATE:
I got the error above fixed, but it still wont work. When I type in ./script in the terminal I get this error:
./script: 11: ppython: not found
Replace /usr/bin/sh with /bin/sh.
Also, dont forget to change this path:
/home/matt/panda3d-1.3.2
Into the path where you have the built Panda3D located.
By the way. A good place to place the files:
the contents of /bin to /usr/bin
the contents of /lib to /usr/lib
the contents of /etc to /etc/
the contents of /include to /usr/include/panda3d
and, ehrm. put the rest in /usr/share/panda3d
Thank you, I’ve done that.
The error I get now is:
Traceback (most recent call last):
File “GreetingCard.py”, line 1, in
import direct.directbase.DirectStart
ImportError: No module named direct.directbase.DirectStart
(trying to run the greetingcard)
oh, add this environment var to your sh file:
PYTHONPATH=/usr/share/panda3d/
export PYTHONPATH
One step closer, but still not close enough:
New error:
its the library path that isnt correct yet.
Make sure the place where you put the panda3d .lib files is on the LD_LIBRARY_PATH:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib/ (or wherever you put the libpanda.lib file or so)
export LD_LIBRARY_PATH
Seems like I am one step closer … again. I copied the Panda-libs into the python lib folder, and now these errors displays: