【发布时间】:2014-09-15 05:53:24
【问题描述】:
我正在使用安装在 mac osx 10.9 上的 scikit-learn 0.15.2,使用 anaconda Python 2.7.8 |Anaconda 2.0.1。
我在 scikit-learn 中修改了一些代码,特别是 gradient_boosting.py。我尝试使用以下方法重建 scikit-learn(在 anaconda 目录内):
python setup.py build
但我得到了:
gcc: src/libsvm/libsvm_template.cpp
gcc: error: src/libsvm/libsvm_template.cpp: No such file or directory
gcc: fatal error: no input files
compilation terminated.
不确定安装 libsvm 是正确的方法还是有更好的方法在 mac osx 和 anaconda 下重建 scikit-learn?
【问题讨论】:
-
scikit-learn 0.15.2的源码是怎么下载的?
-
已修补的 libsvm 源码包含在 scikit-learn 的源码分发中:无需单独安装 libsvm。
-
我是直接修改anaconda目录下的代码:anaconda/pkgs/scikit-learn-0.15.0-np18py27_0/lib/python2.7/site-packages/sklearn/ensemble/gradient_boosting.py
-
@Kasra:请注意,内联代码跨度 (
like this) 不是为了强调,它们只能用于句子中的代码。有关更多信息,请参阅此Meta post。谢谢!
标签: python macos scikit-learn anaconda