在 Anaconda 上升级到 scikit-learn 的开发版本?

upgrade to dev version of scikit-learn on Anaconda?

我正在通过 Anaconda 使用 python,并且想使用 scikit-learn 中的一项新功能 (http://scikit-learn.org/dev/modules/neural_networks_supervised.html),该功能目前仅在开发版本 0.18.dev0 中可用。

但是,经典的 conda update 似乎不起作用,因为 conda 没有列出任何开发包。将开发版本安装到我的 Anaconda 中的最简单方法是什么? (为了它的价值,我使用的是 64 位 windows 7。)

您只能使用 conda 安装包,前提是有人已经为包构建并提供了二进制文件。一些软件包发布允许这样做的夜间构建,但 scikit-learn 不是其中之一。

要通过一个命令安装最新版本,您可以使用 pip;例如:

$ conda install pip
$ pip install git+git://github.com/scikit-learn/scikit-learn.git

但请记住,这需要编译库中的所有 C 扩展,因此如果您的系统没有为此进行设置,它将失败。

您应该在 Anaconda 上构建您自己的 scikit-learn 包。我在大约 10 分钟内完成了(repo)(package). The conda tutorial on how to build packages was helpful. There are probably more ways than one to do this, but I just downloaded the scikit-learn github repo, dropped it into a new repo, added a directory that housed my conda recipe, and then built the package from the recipe which pointed to the source code 我刚下载。

我有没有 MLPClassifier 的 scikit-learn 0.17。我刚刚做了如下的 conda 更新:

conda update scikit-learn

conda 负责更新所有依赖包,更新后它可以正常工作!