Python can't import shapely

梦想与她 提交于 2019-12-01 13:17:57

You have set homebrew to install things in your home directory (well, the homebrew subdirectory in your home directory). That's ok, but you'll have to tell your system to find the installed libraries there. /opt/local/lib is commonly found automatically, but /Users/tc9/homebrew/lib won't.

So instead of setting GEOS_LIBRARY_PATH, try setting DYLD_LIBRARY_PATH as follows:

export DYLD_LIBRARY_PATH=/Users/tc9/homebrew/lib

You can do this on the command line first, and if it works, put it in your profile.

Note that I'm not using the Cellar subdirectory; you should see that as an archive for homebrew, but not as the actual files in use. For that, use /home/tc9/homebrew (with lib, bin etc appended). So for example, your PATH should also not include the Cellar directory.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!