I have successfully installed pyads version 3.3.9 on my Raspberry Pi, which is running a 64-bit Linux kernel (6.1.0-rpi7-rpi-2712) and Python 3.11.2. However, when attempting to import pyads in Python, I encounter an OSError indicating an architecture mismatch for the adslib.so library:
OSError: /usr/local/lib/python3.11/dist-packages/pyads/adslib.so: wrong ELF class: ELFCLASS32
This error suggests that the adslib.so included with pyads is compiled for a 32-bit architecture, while my Raspberry Pi system is based on a 64-bit (aarch64) architecture. Consequently, pyads fails to load the essential shared library due to this mismatch.
While I understand that a potential workaround could involve cloning the source code and compiling it locally for a 64-bit architecture, my goal is to streamline the process through automation. Ideally, I would prefer to install pyads using pip install without additional manual steps to ensure compatibility with 64-bit systems.
Questions:
- Has anyone managed to overcome this issue in a way that aligns with an automated setup, particularly for 64-bit Raspberry Pi environments?
- Is there a plan or possibility to support automatic compatibility for 64-bit architectures directly through pip install for the pyads project in the near future?
Any insights or suggestions on how to address this architecture mismatch efficiently would be greatly appreciated, especially from those aiming for a seamless setup process.
Unfortunately the automated pip install process is not working correctly with all Linux variants. Hopefully this issue will be resolved at some point, pyads is open source and is managed by volunteers when time is available, so there is no roadmap for this feature. The best option you have is to manually compile the so (https://pyads.readthedocs.io/en/latest/installation.html#installation-on-linux) and then pip install. This likely could be automated using tox / other build tools etc but I have not done so myself.