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

前端 未结 5 1312
自闭症患者
自闭症患者 2021-02-20 01:16

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:

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-20 02:06

    @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.

提交回复
热议问题