Python Anaconda linking

2019-08-10 19:38发布

I've been trying to install gdal on my Mac, but have been getting errors when running ogr2ogr like so:

dyld: Library not loaded: libcurl.4.dylib
  Referenced from: /usr/local/bin/ogr2ogr
  Reason: Incompatible library version: ogr2ogr requires version 8.0.0 or later, 
  but libcurl.4.dylib provides version 7.0.0
Trace/BPT trap: 5

Not being able to find a solution, I had a hunch that Anaconda was part of the problem, since I was getting this:

->which curl
~/anaconda/bin/curl

so, to fix the problem I removed the curl package by running:

conda remove curl

and doing this along with removing the libxml library, I was all set and ogr2ogr was working.

My question is whether or not there was a better way around this than simply removing the packages. I'm afraid my knowledge of how these dynamic libraries work and how they integrate is lacking, and would appreciate some help.

Thanks!

2条回答
干净又极端
2楼-- · 2019-08-10 20:13

This is an indirect answer, but I had configuration issues with both Anaconda and Enthought Canopy on my MacBook Air. No trouble at all building out packages using Homebrew. I installed GDAL, shapely, etc. with Homebrew after first following the instructions on this link for general NumPy SciPy ecosystem packages:

http://joernhees.de/blog/2013/06/08/mac-os-x-10-8-scientific-python-with-homebrew/

I think two or three of those packages failed, but I was able to dig out an additional dependency or use pip or setup_tools to grab it instead. I think I used pip to grab gdal, etc. afterwards.

查看更多
萌系小妹纸
3楼-- · 2019-08-10 20:22

The curl package that comes with Anaconda on Mac is not really needed, since Mac OS X comes with its own curl. So removing it is fine.

查看更多
登录 后发表回答