【问题标题】:Correct way to install scikit-learn on OS-X using port使用端口在 OS-X 上安装 scikit-learn 的正确方法
【发布时间】:2013-04-11 00:30:27
【问题描述】:

我打算在 OS-X 上使用端口安装 scikit-learn。知道我在这里缺少什么。

端口版本

Version: 2.1.3

操作系统-X

10.8.2 Build 12C60 

Xcode

Version 3.2.5 (1760)

Python

Python 2.7.2 (default, Jun 20 2012, 16:23:33) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 

安装 scikit-learn 的命令

sudo port install py27-scikit-learn
--->  Computing dependencies for py27-scikit-learn
--->  Cleaning py27-scikit-learn
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.

但是,它似乎没有正确安装或配置。我在这里想念什么?

>>> import sklearn
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named sklearn
>>> from sklearn import cluster, covariance, manifold
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named sklearn
>>> 

【问题讨论】:

  • 我不知道你是如何绑定到端口的,但是当 10.8 出来时,我真的不能再依赖它了,切换到 brew 非常愉快。
  • osx 上的 Xcode 3.2 也不支持,是否需要 xcode-switch 到 4.6?

标签: macos python-2.7 scikit-learn


【解决方案1】:

我搬到了 Homebrew,之后的一切都很简单。

【讨论】:

    猜你喜欢
    • 2012-05-03
    • 2013-02-04
    • 2017-08-30
    • 2015-06-28
    • 2020-03-09
    • 1970-01-01
    • 1970-01-01
    • 2011-11-10
    • 2013-08-01
    相关资源
    最近更新 更多