I'm facing difficulties while trying to install the Shapely library on an OpenWRT Linux x86 version where I cannot use pip due to lack of support. The Python version available is 3.9. My objective is to use Shapely, and I've attempted the following methods:
- Downloaded the
shapely-2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whlfile, extracted it, and copied both theshapelyandshapely.libsfolders. This approach has worked for other libraries, but it results in the following error:
from .lib import GEOSException # NOQA
ModuleNotFoundError: No module named 'shapely.lib'
I noticed that it's looking for the file lib.cpython-39-x86_64-linux-gnu.so, so I renamed it to lib.so. However, when I rerun the Python script, I encounter this error:
ImportError: /rwdata/opt/gt/adv_libs/shapely/lib.so: wrong ELF class: ELFCLASS64
Even though the filename suggests x86_x64, it seems to have an ELF class issue.
- Tried with an older version, Shapely 1.7.1, which has a different structure and doesn't give the
shapely.liberror. However, it raises the following error:
OSError: /rwdata/opt/gt/adv_libs/Shapely.libs/libgeos_c-a68605fd.so.1.13.1: wrong ELF class: ELFCLASS64
- Attempted to install from the source using the
setup.py installcommand, but it fails due to the absence of setuptools, which cannot be installed.
Am I overlooking any steps or making any mistakes in this installation process? Any guidance on how to successfully install the Shapely library in this environment would be greatly appreciated.
EDIT: Linux version is x86