简体   繁体   English

geopandas / 匀称的兼容性

[英]geopandas / Shapely Compatibility

I am using Shapely, geopandas and pygeos and get the following warning:我正在使用 Shapely、geopandas 和 pygeos 并收到以下警告:

 UserWarning: The Shapely GEOS version (3.10.2-CAPI-1.16.0) is incompatible with the GEOS version PyGEOS was compiled with (3.10.1-CAPI-1.16.0). Conversions between both will be slow.

The respective versions are:各自的版本是:

 Shapely 1.8.2 geopandas 0.10.2 pygeos 0.12.0

Question:问题:

Can I solve this issue by upgrading / downgrading one of the versions?我可以通过升级/降级其中一个版本来解决这个问题吗? I was not able to find a list of compatible versions.我找不到兼容版本的列表。

The following solution (originally posted here ) worked for me:以下解决方案(最初在此处发布)对我有用:

pip install --force-reinstall --no-binary shapely shapely pip install --force-reinstall --no-binary shapely shapely

If encounter OSError: /home/users/xxx/miniconda3/envs/nuplan/lib/libgeos_c.so: cannot open shared object file: No such file or directory, then do如果遇到 OSError: /home/users/xxx/miniconda3/envs/nuplan/lib/libgeos_c.so: cannot open shared object file: No such file or directory,然后执行

conda install -c conda-forge pygeos conda install -c conda-forge pygeos

to fix the missing library problem eventually you have to do (not necessary in my case)最终您必须解决丢失的库问题(在我的情况下不是必需的)

export LD_LIBRARY_PATH=$LD_LIBARRY_PATH:$HOME/miniconda3/env/nuplan/lib导出 LD_LIBRARY_PATH=$LD_LIBARRY_PATH:$HOME/miniconda3/env/nuplan/lib

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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