简体   繁体   中英

Installing Error of Shapely and GDAL on pydroid

Pydroid is a good app for beginners and others for running python on android. I could install many useful libraries without any problems, but I don't understand why some libraries such as GDAL , Shapely , Pyproj could not be installed.

Installation Error:

ERROR: Command errored out with exit status 1:
command: /data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/ru.iiec.pydroid3/cache/pip-install-1glqlnnp/shapely/setup.py'"'"'; __file__='"'"'/data/data/ru.iiec.pydroid3/cache/pip-install-1glqlnnp/shapely/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /data/data/ru.iiec.pydroid3/cache/pip-install-1glqlnnp/shapely/pip-egg-info
             cwd: /data/data/ru.iiec.pydroid3/cache/pip-install-1glqlnnp/shapely/
        Complete output (11 lines):
        Failed `CDLL(libgeos_c.so.1)`
        Failed `CDLL(libgeos_c.so)`
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/data/data/ru.iiec.pydroid3/cache/pip-install-1glqlnnp/shapely/setup.py", line 80, in <module>
            from shapely._buildcfg import geos_version_string, geos_version, \
          File "/data/data/ru.iiec.pydroid3/cache/pip-install-1glqlnnp/shapely/shapely/_buildcfg.py", line 167, in <module>
            fallbacks=['libgeos_c.so.1', 'libgeos_c.so'])
          File "/data/data/ru.iiec.pydroid3/cache/pip-install-1glqlnnp/shapely/shapely/_buildcfg.py", line 161, in load_dll
            libname, fallbacks or []))
        OSError: Could not find library geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so']
        ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    /storage/emulated/0 $

Any help would be appreciated. I am running Android Nougat Version 7.0 and Pydroid 3 (python3).

The three python module you mention all depend on C libraries, ie they are not pure python but provide an interface to lower level functions. Specifically, the three mentioned python modules need these libraries:

  1. GDAL is toolset for the GDAL library
  2. Shapely , as your error message suggests depends on Geos
  3. pyproj is an interface for proj

As such, you would need to download and compile these libraries yourself for your system (or find pre-compiled binaries, but that sounds unlikely for your setup). Only then would you be able to install and use the corresponding python modules.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM