Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Panda3d not working #21869

Open
milen-prg opened this issue Oct 18, 2024 · 17 comments · May be fixed by #21915
Open

[Bug]: Panda3d not working #21869

milen-prg opened this issue Oct 18, 2024 · 17 comments · May be fixed by #21915
Labels
bug report Something is not working properly python Issue is about Python related stuff, including pip

Comments

@milen-prg
Copy link

Problem description

Installed panda3d and python, but import direct... in python returns no module

What steps will reproduce the bug?

pkg install python
pkg install panda3d

Try to import panda3d in python

What is the expected behavior?

No response

System information

Android, Termux
@milen-prg milen-prg added bug report Something is not working properly untriaged labels Oct 18, 2024
@truboxl truboxl added python Issue is about Python related stuff, including pip and removed untriaged labels Oct 19, 2024
@twaik
Copy link
Member

twaik commented Oct 19, 2024

For some reason panda3d package does not contain python-related stuff, only C/C++ headers and libraries. Should be investigated.

@twaik
Copy link
Member

twaik commented Oct 19, 2024

Also you did not provide correct system information data. The field has clear explanation what you should post there.
image

@milen-prg
Copy link
Author

milen-prg commented Oct 19, 2024

Also you did not provide correct system information data. The field has clear explanation what you should post there.
image

❯ python
Python 3.12.7 (main, Oct 6 2024, 15:06:14) [Clang 18.0.2 (https://android.googlesource.com/toolchain/llvm-project d8003a456 on linux
Type "help", "copyright", "credits" or "license" for more information.

from direct.showbase.ShowBase import ShowBase
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'direct'

@twaik
Copy link
Member

twaik commented Oct 19, 2024

Read it carefully again.
image

@milen-prg
Copy link
Author

milen-prg commented Oct 19, 2024

I apologise. This:

❯ termux-info
Termux Variables:
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=821
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.1
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirror.csclub.uwaterloo.ca/termux/termux-main stable main
# x11-repo (sources.list.d/x11.list)
deb https://mirror.csclub.uwaterloo.ca/termux/termux-x11 x11 main
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
Updatable packages:
All packages up to date
termux-tools version:
1.44.1
Android version:
14
Kernel build information:
Linux localhost 4.19.191-perf-g23d0d870bbdb #1 SMP PREEMPT Mon Aug 5 14:02:54 UTC 2024 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
23053RN02Y
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.x11 versionCode:15

@twaik twaik linked a pull request Oct 21, 2024 that will close this issue
@twaik
Copy link
Member

twaik commented Oct 21, 2024

@milen-prg you are welcome to test build artifacts from https://github.com/termux/termux-packages/actions/runs/11433861257

@milen-prg
Copy link
Author

@milen-prg you are welcome to test build artifacts from https://github.com/termux/termux-packages/actions/runs/11433861257

Thanks. How to test the new version, upgrading of the system didn't help.

@twaik
Copy link
Member

twaik commented Oct 21, 2024

Upgrading system should not. Because these changes are not merged. Download build artifacts and install them with apt like apt install ./package.deb (point and slash are necessary).
image

@milen-prg
Copy link
Author

@twaik
❯ apt install ./panda3d_1.10.14-2_arm.deb Reading package lists... Done Building dependency tree... Done
Reading state information... Done
Note, selecting 'panda3d:arm' instead of './panda3d_1.10.14-2_arm.deb' Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
panda3d:arm : Depends: libc++:arm but it is not installable
Depends: python:arm but it is not installable
E: Unable to correct problems, you have held broken packages.
  ~/debs ❯  00:11:5

@twaik
Copy link
Member

twaik commented Oct 21, 2024

Why are you installing arm version? Most likely your device is aarch64...

@milen-prg
Copy link
Author

milen-prg commented Oct 21, 2024

@twaik , I apologise, I'm python developer and know little about Linux system. Here it is, no difference with the new packages:

❯ cd debs                           ❯ ls                                 built_termux-main_packages.txt
 panda3d-samples_1.10.14-2_all.deb
 panda3d-static_1.10.14-2_aarch64.deb
 panda3d_1.10.14-2_aarch64.deb
❯ pkg install ./panda3d_1.10.14-2_aarch64.deb ./panda3d-samples_1.10.14-2_all.deb
Checking availability of current mirror:
[*] https://termux.danyael.xyz/termux/termux-main: ok                   Hit:1 https://turdl.kcubeterm.com tur-packages InRelease
Hit:2 https://termux.danyael.xyz/termux/termux-main stable InRelease
Hit:3 https://termux.danyael.xyz/termux/termux-x11 x11 InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
4 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'panda3d' instead of './panda3d_1.10.14-2_aarch64.deb'
Note, selecting 'panda3d-samples' instead of './panda3d-samples_1.10.14-2_all.deb'
The following NEW packages will be installed:
  panda3d panda3d-samples
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/24.5 MB of archives.
After this operation, 49.8 MB of additional disk space will be used.
Get:1 /data/data/com.termux/files/home/debs/panda3d_1.10.14-2_aarch64.deb panda3d aarch64 1.10.14-2 [3648 kB]
Get:2 /data/data/com.termux/files/home/debs/panda3d-samples_1.10.14-2_all.deb panda3d-samples all 1.10.14-2 [20.9 MB]
Selecting previously unselected package panda3d.
(Reading database ... 119307 files and directories currently installed.)
Preparing to unpack .../panda3d_1.10.14-2_aarch64.deb ...
Unpacking panda3d (1.10.14-2) ...
Selecting previously unselected package panda3d-samples.
Preparing to unpack .../panda3d-samples_1.10.14-2_all.deb ...
Unpacking panda3d-samples (1.10.14-2) ...
Setting up panda3d (1.10.14-2) ...
Setting up panda3d-samples (1.10.14-2) ...
Processing triggers for shared-mime-info (2.4) ...
❯ python                            Python 3.12.7 (main, Oct  6 2024, 15:06:14) [Clang 18.0.2 (https://android.googlesource.com/toolchain/llvm-project d8003a456 on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from direct.showbase.ShowBase import ShowBase
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'direct'
>>>

How to force to use the deb files instead of the repo packages? The apt works exactly as the pkg

@twaik
Copy link
Member

twaik commented Oct 21, 2024

  1. Please, use code syntax (triple backtics). Otherwise markdown breaks layout.
  2. What is direct? It does not seem to be a part of panda3d package. Did you install it with pip3?
  3. No need to force deb installation. Packages will be available in repos when we done here.

@milen-prg
Copy link
Author

  1. Please, use code syntax (triple backtics). Otherwise markdown breaks layout.
  2. What is direct? It does not seem to be a part of panda3d package. Did you install it with pip3?
  3. No need to force deb installation. Packages will be available in repos when we done here.

Direct is from the main panda3d example for python:

https://docs.panda3d.org/1.10/python/introduction/tutorial/starting-panda3d

As I see, the apt installs the packages from the repo, not the files:
..." Note, selecting 'panda3d' instead of './panda3d_1.10.14-2_aarch64.deb' Note, selecting 'panda3d-samples' instead of './panda3d-samples_1.10.14-2_all.deb' The following NEW packages will be installed: panda3d panda3d-samples"...

@twaik
Copy link
Member

twaik commented Oct 21, 2024

No, it installed debs.

After this operation, 49.8 MB of additional disk space will be used.
Get:1 /data/data/com.termux/files/home/debs/panda3d_1.10.14-2_aarch64.deb panda3d aarch64 1.10.14-2 [3648 kB]
Get:2 /data/data/com.termux/files/home/debs/panda3d-samples_1.10.14-2_all.deb panda3d-samples all 1.10.14-2 [20.9 MB]

@milen-prg
Copy link
Author

No, it installed debs.

After this operation, 49.8 MB of additional disk space will be used.
Get:1 /data/data/com.termux/files/home/debs/panda3d_1.10.14-2_aarch64.deb panda3d aarch64 1.10.14-2 [3648 kB]
Get:2 /data/data/com.termux/files/home/debs/panda3d-samples_1.10.14-2_all.deb panda3d-samples all 1.10.14-2 [20.9 MB]

Oh, I see. But the panda3d modules can't be imported in python ☹️.

@twaik
Copy link
Member

twaik commented Oct 21, 2024

Probably we should do full panda building, but it will require moving panda3d to x11-repo.
Also panda3d's window will not appear without X server running.

@milen-prg
Copy link
Author

I tried it directly in the working xfce4 environment via VNC.
The raylib works for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly python Issue is about Python related stuff, including pip
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants