TransWikia.com

shapely.vectorized is not installed when building from sources

Geographic Information Systems Asked on May 18, 2021

My application (named it foo) relies on shapely modules. This dependency is listed in the setup.py of foo.

Part of the foo code uses the shapely.vectorized submodule, that is generated using cython.

As foo needs a specific version of geos (that is also a dependency of shapely), we have to build shapely from sources. PIP_NO_BINARY environment variable is set for that purpose.

When installing our application on the final platform, a pip install foo correctly installed shapely but the shapely.vectorized is not generated as cython is not listed as a dependecy of shapely (and so it is not installed).

Steps to reproduce:

$ pip freeze # Check cython is not installed
...
$ PIP_NO_BINARY=Shapely pip install Shapely
$ python -c 'import shapely.vectorized'

enter image description here

For various reasons, it would be great to not pre-install Cython. I also tried to do :

PIP_NO_BINARY=Shapely pip install Shapely[vectorized]

But it didn’t help. Have you some ideas to easily install shapely in that context?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP