Network problems from a flatpak package

I am trying to use pip to install inside a flatpak to get a dependency. My runtime has python3 and all the stuff leading up the the actual installation works just fine.
When trying to install something, I get multiple Network Errors, telling me

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f7a9e7207c0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/

How can I solve this?

Build for Flathub should be offline. Please check my manifesto file GitHub - flathub/eu.cichy1173.tabela I use python Pyside6 dependency. THis topic may help you: Offline Flathub build with PySide6 dependency

I am not sure that I understand what you mean. I am using a library (that my project has as a submodule and is building from source). That project’s setup script needs libclang and it installs it via pip. I am not very good with python, I do not understand how your manifest file is showing what I’d need to do.

You should not use pip install command inside Flathub build. Try use this instead

I have tried using the tool which worked to some extend, but now I am at a sub-dependency of a dependency that is installed via pip and that is git cloning another repository which is failing since it can not access the internet. This is my current file:

app-id: com.librumreader.librum
runtime: org.kde.Platform
runtime-version: '6.5'
sdk: org.kde.Sdk
command: librum
- --share=ipc
- --share=network
- --socket=x11
- --socket=wayland
- --filesystem=host
- --device=dri
- python3-setuptools_scm.yaml
- python3-scikit-build.yaml
- python3-swig.yaml
- python3-libclang.yaml
- name: librum-bin
buildsystem: cmake-ninja
- type: git
branch: main
- name: file-install
buildsystem: simple
- install -Dm644 librum.desktop -t /app/share/applications
# - install -Dm644 data/com.librumreader.librum.metainfo.xml -t /app/share/metainfo
- install -Dm644 src/logo.svg -t /app/share/icons/hicolor/scalable/apps
- mv /app/share/icons/hicolor/scalable/apps/logo.svg /app/share/icons/hicolor/scalable/apps/librum.svg

You might want to post the sub error. Is it that rust subdependency?