为什么使用pip安装numpy失败,而直接构建却没有?

时间:2012-11-01 20:16:55

标签: python numpy pip python-3.3

我正在尝试在运行Mac OS 10.7.5(Lion)的Python 3.3.0下安装numpy并使用Xcode 4.5.1附带的编译器。我使用gfortran安装了Python 3和homebrew,没有任何打嗝,但pip3 install numpy失败。在线查看其他建议,我尝试使用以下方法将Clang设置为C编译器:

export CC=clang
export CXX=clang
export FFLAGS=-ff2c

但收到同样的错误。最后一行报告ValueError: underlying buffer has been detachedposted the full output

所以,我尝试使用instructions from SciPy.org直接从源代码构建。这似乎成功了;构建和安装过程运行完成,尽管他们并不羞于报告警告。完整日志再次为available as a Gist。然后,我可以从Python 3运行numpy.test('full'),虽然有一些关于我不理解的未关闭文件的警告,但它reports that all tests pass

有没有人知道为什么pip无法构建NumPy,因为我显然可以手动完成而没有问题?

1 个答案:

答案 0 :(得分:0)

看起来numpy现在在pypi上提供了轮子,它应该正确安装,而不需要在使用pip时在你的机器上本地编译任何东西。

相关问题