I am trying to get panda3d working on android, and I managed to build and install it, and I now have the pandaviewer and panda python, but I have no idea how to actually run it, so how can I do that, I already tried just running ppython from termux, but that didn’t work.
Did you install Panda into the system/termux Python? If so, you should just be able to run
python. For example,
I used this script
export LD_LIBRARY_PATH=/system/lib64:$LD_LIBRARY_PATH rm -f panda3d.apk python makepanda/makepanda.py --everything --target android --installer --threads 2 $@ if [ -f panda3d.apk ]; then cp panda3d.apk /sdcard/panda3d.apk xdg-open /sdcard/panda3d.apk done
to build an apk and run it, and it installed it. When I run just the basic hello world program it throws an error: “ModuleNotFoundError: No module named ‘direct’”, so I guess it’s not installed into the system/termux python.
I am not very familiar with the process of running Panda on Android/termux, but I would try creating a wheel (add
--wheel to the
makepanda.py flags) and installing that (
pip install -U path/to/panda3d*.whl).
I don’t think installing wheels is supported on Android, so I would not suggest doing the above.
You can’t run Panda3D with termux’ copy of Python because we can’t open graphics windows from termux. You need to use the script in the panda/src/android directory to launch the Python application and pipe stuff to/from it.
I’m in a hurry now, I may have time for a more detailed reply later
I’m trying to find that directory, but I just can’t find it, is it accessible if your device isn’t rooted?
Edit: nevermind, I’m just really dumb and it’s just in the panda source code.
Edit 2: I think it’s working now, thanks so much.