【问题标题】:scikit-learn installation errorscikit-learn 安装错误
【发布时间】:2014-06-27 21:46:18
【问题描述】:

我正在尝试在我的 osx 10.6.8 中安装 scikit-learn-0.14.1,但正如我被告知的那样,我之前必须安装 numpy 和 scipy。但是,当我尝试运行每个安装 setup.py 程序时,我收到以下错误消息。我该怎么办?

NumPY-1.8.1 文件“numpy/core/setup.py”,第 682 行,在 get_mathlib_info raise RuntimeError("Broken toolchain: cannot link a simple C program") RuntimeError: Broken toolchain: cannot link a simple C program

SciPY-0.14.0 ValueError: numpy >= 1.4 is required(从 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/numpy/init.pyc 检测到 1.2.1)

Scikit-learn-0.14.1

  error: Command "g++-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -c sklearn/svm/src/libsvm/libsvm_template.cpp -o build/temp.macosx-10.6-universal-2.6/sklearn/svm/src/libsvm/libsvm_template.o" failed with exit status 127

【问题讨论】:

  • 您没有安装有效的 C 和 C++ 编译器。
  • 感谢它现在的运行。现在我在尝试安装 scipy 时收到错误消息。 ValueError: 需要 numpy >= 1.4(从 /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/numpy/__init__.pyc 检测到 1.2.1)但我已经安装了 numpy 1.8。你知道为什么找不到 1.8 版本吗?

标签: python-2.7 numpy scipy scikit-learn


【解决方案1】:

更容易下载 Anaconda 发行版。 https://store.continuum.io/cshop/anaconda/

【讨论】:

  • 不鼓励只留下链接。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2016-02-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-01-08
  • 1970-01-01
  • 2015-12-13
相关资源
最近更新 更多