【发布时间】: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