Adding panda3d to a flatpak manifest

I’m trying to add panda3d to a manifest but flatpak-pip-generator doesn’t work with it. I even found the link with the download and the SHA but panda3d is not installed and generates a generic compilation error, probably because there are dependencies that I’m not covering because I didn’t find anywhere the list of mandatory panda3d dependencies.

The error:

Unresolved dependencies. Handle them manually
- ERROR: Failed to get panda3d-1.10.15 source from https://pypi.org/pypi/panda3d/1.10.15/json
Traceback (most recent call last):
  File "/var/home/k/Projetos/flatpak-pip-generator.py", line 533, in <module>
    raise Exception(f"Not all dependencies can be determined. Handle them manually.\n{workaround}")
Exception: Not all dependencies can be determined. Handle them manually.
Example how to handle wheels which only support specific architectures:
    - type: file
      url: https://files.pythonhosted.org/packages/79/ae/7e5b85136806f9dadf4878bf73cf223fe5c2636818ba3ab1c585d0403164/numpy-1.26.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
      sha256: 7ab55401287bfec946ced39700c053796e7cc0e3acbef09993a9ad2adba6ca6e
      only-arches:
      - aarch64
    - type: file
      url: https://files.pythonhosted.org/packages/3a/d0/edc009c27b406c4f9cbc79274d6e46d634d139075492ad055e3d68445925/numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
      sha256: 666dbfb6ec68962c033a450943ded891bed2d54e6755e35e5835d63f4f6931d5
      only-arches:
      - x86_64

I think you should be able to install it from .whl file similar to this:

I had already tried this but it doesn’t work.


 - name: python3-panda3d
    buildsystem: simple
    build-commands:
      - pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "panda3d" --no-build-isolation
    sources:
      - type: file
        url: 'https://files.pythonhosted.org/packages/ca/99/4f385683203646e81ad25f1ff880c7d46b2e1843b580bbbeb5a6643ca22d/panda3d-1.10.15-cp313-cp313t-manylinux2014_x86_64.whl'
        sha256: db8ad9ff7f48ee1d6b67716124aa8201aa49a92f95b58bb99822208bfbd32a8e

The error:


ERROR: Could not find a version that satisfies the requirement panda3d (from versions: none)
ERROR: No matching distribution found for panda3d
Error: module python3-panda3d: Processo filho concluiu com código 1
>>> Error: Child process exited with code 1

Is the error coming from flatpak-pip-generator?

Also, your yaml snippet has bad indentation

The error in the first post is from the pip generator, the second error is the flatpak compilation error. Can you tell me where the indentation is incorrect? I don’t believe that’s the problem, but you never know.

the labels under name should be on the same level as name itself

It’s likely that you want the wheel with cp313-cp313- (no t) in the name. The cp313t marker is an ABI tag for free-threading Python, which is an experimental new thing, so unless you know you’re using it, you’re probably not. A regular Python build won’t see that wheel as compatible, which would fit with the “from versions: none” error message.

Also, if you haven’t already, make sure to get the wheel for the Python version you’re using. cp313 means Python 3.13.

2 Likes

Adding panda3d to a Flatpak manifest can indeed be tricky because it doesn’t publish platform-agnostic wheels on PyPI, and flatpak-pip-generator struggles with packages that require native compilation or depend on external libraries.

Why it Fails

panda3d builds native C++ code during installation, and its wheel (when available) is architecture- and environment-specific. The error you’re seeing means the generator can’t resolve all build-time dependencies automatically—likely because Panda3D’s wheel isn’t universal or it’s missing altogether for your target architecture.

How to Work Around It

You have a few options:

1. Build from Source in Your Manifest

Instead of relying on flatpak-pip-generator, manually build panda3d using a buildsystem: simple step inside your Flatpak manifest. Here’s a rough example (ensure you add all required dependencies):

yaml

CopyEdit

- name: panda3d
  buildsystem: simple
  build-commands:
    - python3 setup.py build
    - python3 setup.py install --prefix=/app
  sources:
    - type: git
      url: https://github.com/panda3d/panda3d.git
      tag: v1.10.15
  build-options:
    env:
      CXXFLAGS: "-O2"

2. Use Prebuilt Wheels per Architecture

If you find precompiled .whl files for your architecture (e.g., from the Panda3D GitHub Actions or official site), you can include them like this:

yaml

CopyEdit

- type: file
  url: https://your-source-url/panda3d-1.10.15-cp311-cp311-manylinux2014_x86_64.whl
  sha256: <insert-sha256>
  only-arches:
    - x86_64

Unfortunately, these wheels aren’t always published or maintained. You’ll need to host them yourself or build them locally and extract them.

3. Include Required Native Dependencies

Panda3D needs several native libraries like OpenGL, SDL2, eigen3, freetype, zlib, and others. You’ll need to add these to your Flatpak manifest under build-dependencies.

Example (assuming a python3 module in Flatpak manifest):

yaml

CopyEdit

  build-dependencies:
    - python3
    - python3-pip
    - mesa-libGL
    - eigen
    - freetype
    - zlib
    - libpng
    - openssl
    - sdl2

TL;DR

  • panda3d isn’t Flatpak- or pip-friendly due to native compilation.
  • Use a git source with setup.py, or manually add wheels per architecture.
  • Ensure all system dependencies are included in the manifest.

Let me know if you’d like a working manifest sample for a particular architecture or runtime (e.g., org.freedesktop.Platform 23.08, Python 3.11).

1 Like

Thank you very much, this is a wonderfully complete answer. I’ll try adding the .whl files for each architecture first, since I already found them on panda3d’s github and since they are available via release I don’t think they will be changed or deleted. If and when I need to update panda3d I’ll reconsider this choice.

@takluyver Thanks, I’ll check that too.

This topic was automatically closed after 4 days. New replies are no longer allowed.