在Mac OS X上为Python 3安装numpy和matplotlib时发生Curl错误10.6

问题描述:

Matplotlib最近有released a python 3 compatible version。要安装matplotlib,你需要numpy。在Mac OS X上为Python 3安装numpy和matplotlib时发生Curl错误10.6

我按照说明here安装matplotlib。我试图根据instructions for Mac OS Lion 10.7 here安装numpy的(希望它可能是很相似),但终端被困在第一个命令:

$curl http://python-distribute.org/distribute_setup.py | python3 

dyld: Library not loaded: @rpath/libcurl.4.dylib 
    Referenced from: /Library/Frameworks/Python.framework/Versions/Current/bin/curl 
    Reason: Incompatible library version: curl requires version 7.0.0 or later, but libcurl.4.dylib provides version 6.0.0 

同为第二个(预期):

$ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python3 

dyld: Library not loaded: @rpath/libcurl.4.dylib 
    Referenced from: /Library/Frameworks/Python.framework/Versions/Current/bin/curl 
    Reason: Incompatible library version: curl requires version 7.0.0 or later, but libcurl.4.dylib provides version 6.0.0 

有关如何解决卷曲错误的任何想法?

+0

你确定他们已经与Python 3发布支持?您的链接只是指向VCS存储库。 – Tshepang 2012-07-28 00:47:37

+0

python3的Matplotlib最初是一个单独的分支,但它已被重新集成到主分支中。这发生在过去几个月内。 – danielle47 2012-07-30 05:31:56

+0

但是一个分支不是一个发布。无论生产者,上游还是下游,释放都称为释放。 – Tshepang 2012-07-30 08:05:05

this post,我找到了更新curl的说明。

但是我担心下载一个Mac安全版本,所以我去了this page,滚动到Mac部分,并在Apple网站上选择了一个。

最后,我决定安装该版本作为一个额外的卷曲(即不更换系统卷曲),所以这里的修改说明:

  1. 下载卷曲源(链接#2)
  2. 取消封存某处的zip文件
  3. 打开一个终端窗口,转到目录包含卷曲来源
  4. 类型:$CFLAGS=-m64 ./configure --prefix=pathname
  5. 类型:$make
  6. 类型:$sudo make install

要运行它时,cd到路径/bin /目录,然后运行:

$ ./curl URL_OF_DOWNLOAD | python3