Python Anaconda链接 [英] Python Anaconda linking

查看:147
本文介绍了Python Anaconda链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试在Mac上安装gdal,但是像这样运行ogr2ogr时遇到错误:

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

无法找到解决方案,我很早就意识到Anaconda是问题的一部分,因为我得到了这个提示:

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

因此,要解决此问题,我通过运行以下命令删除了curl软件包:

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

conda remove curl

并通过删除libxml库进行此操作,我一切就绪,ogr2ogr正常运行.

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.

谢谢!

推荐答案

这是一个间接答案,但是我的MacBook Air上的Anaconda和Enthought Canopy都存在配置问题.使用Homebrew构建软件包完全没有问题.首先按照此链接中有关常规NumPy SciPy生态系统软件包的说明进行操作后,我用Homebrew安装了GDAL,shapely等.

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/

我认为其中两个或三个软件包失败了,但是我能够挖掘出更多的依赖关系,或者使用pip或setup_tools来获取它.我想我以后会用点子来抓住gdal等.

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.

这篇关于Python Anaconda链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆