I\'m just trying to use the demo code. I run the following in Jupyter Notebook:
from shapely.geometry import shape
Which gives me the following:
You may try to reset the environment variable DYLD_FALLBACK_LIBRARY_PATH
:
export DYLD_FALLBACK_LIBRARY_PATH=$(HOME)/lib:/usr/local/lib:/lib:/usr/lib
Source
@user2977865 and @anothernode are correct in their approach but it may not work for everyone.
By default, shapely
will look for libraries in the DYLD_PATH
.
I had it set to DYLD_LIBRARY_PATH=/usr/local/lib/:/usr/local/mysql/lib/
But these libraries are placed in /usr/lib
.
So I had to modify it as follows:
export DYLD_LIBRARY_PATH=/usr/lib/:/usr/local/mysql/lib/
Bonus note: Ensure that your environment variables have been set by restarting terminal and clearing cache of any IDEs you might be using.
The way I fixed it:
apk add geos libc-dev musl-dev
pip install Shapely
For me, only works after installing Shapely from the shapely lib and executing the following command from Anaconda Prompt:
pip install Shapely-1.7.1-cp37-cp37m-win_amd64.whl --force-reinstall
This forces a re-install of shapely.
I simply uninstalled Shapely and re-installed it to fix the issue.
python -m pip uninstall shapely
python -m pip install shapely