How to install confluent-kafka 2.4.0 on OpenWrt

Hello, I tried to install "confluent-kafka 2.4.0" on my OpenWrt 22.03.5 using the command "pip install confluent-kafka", as I would like to use a Kafka Producer on it. The Python version on my router is: 3.10.13

However, I got the following error:

DEPRECATION: confluent-kafka is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
error: subprocess-exited-with-error

× Running setup.py install for confluent-kafka did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Running setup.py install for confluent-kafka ... error
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> confluent-kafka

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

I have not found any solutions yet. Could someone please help me with this issue?

Thank you.

Please post
ubus call system board

You need to compile all C libraries needed by package for/on openwrt.

Thank you for your reply.

{
        "kernel": "5.10.176",
        "hostname": "OpenWrt",
        "system": "ARMv7 Processor rev 0 (v7l)",
        "model": "Netgear R8000 (BCM4709)",
        "board_name": "netgear,r8000",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "22.03.5",
                "revision": "r20134-5f15225c1e",
                "target": "bcm53xx/generic",
                "description": "OpenWrt 22.03.5 r20134-5f15225c1e"
        }
}

You provide way too little context. You need to build all C dependencies for the python module.