编程语言
首页 > 编程语言> > python Shapely OSError: Could not find lib c or load any of its variants []

python Shapely OSError: Could not find lib c or load any of its variants []

作者:互联网

mac 升级过后,python项目运行报错python Shapely OSError: Could not find lib c or load any of its variants []
在github上找到解决办法没记录如下:
To recap, I removed anything dealing with conda that depends on geos:

conda remove geos, shapely, cartopy

Then installed geos with brew:

brew install geos

Added Kelsey’s workaround to my .bash_profile:

export DYLD_FALLBACK_LIBRARY_PATH=$(HOME)/lib:/usr/local/lib:/lib:/usr/lib

And then pip’ed the two libraries:

pip install shapely
pip install git+git://github.com/SciTools/cartopy.git

Doing that in both the general setup and/or the scipygis virtual env seems to get cartopy to finally work.
我本地的地址如下:

export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/Cellar/geos/3.8.1_1/lib:/usr/local/lib:/lib:/usr/lib

标签:load,OSError,Shapely,lib,python,geos,usr,cartopy,pip
来源: https://blog.csdn.net/solocao/article/details/109921277