简体   繁体   English

升级到开发版的scikit-learn on Anaconda?

[英]upgrade to dev version of scikit-learn on Anaconda?

I'm using python through Anaconda, and would like to use a new feature ( http://scikit-learn.org/dev/modules/neural_networks_supervised.html ) in scikit-learn that's currently only available in the development version 0.18.dev0. 我正在通过Anaconda使用python,并希望在scikit中使用新功能( http://scikit-learn.org/dev/modules/neural_networks_supervised.html ) - 目前仅在开发版本0.18.dev0中可用。

However, doing the classical conda update doesn't seem to work, as conda doesn't list any dev packages. 但是,做经典的conda update似乎不起作用,因为conda没有列出任何开发包。 What would be the simplest way to install a development version into my Anaconda? 将开发版本安装到我的Anaconda中最简单的方法是什么? (For what it's worth, I'm using 64-bit windows 7.) (对于它的价值,我使用的是64位窗口。)

You can only use conda to install a package if someone has built and made available binaries for the package. 如果有人为程序包构建并提供了二进制文件,则只能使用conda来安装程序包。 Some packages publish nightly builds that would allow this, but scikit-learn is not one of them. 有些软件包会发布允许这样做的夜间版本,但scikit-learn不是其中之一。

To install the bleeding-edge version in one command, you could use pip; 要在一个命令中安装最新版本,可以使用pip; eg: 例如:

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

but keep in mind that this requires compiling all the C extensions within the library, and so it will fail if your system is not set up for that. 但请记住,这需要编译库中的所有C扩展,因此如果没有为此设置系统,它将失败。

I had scikit-learn 0.17 which did not have MLPClassifier. 我有scikit-learn 0.17没有MLPClassifier。 I just did a conda update like below: 我刚做了如下的conda更新:

conda update scikit-learn

conda takes care of updating all dependent packages and after the update it works! conda负责更新所有依赖包,并在更新后工作!

You should build your own scikit-learn package on Anaconda. 你应该在Anaconda上建立自己的scikit-learn包。 I did it in about 10 mins ( repo )( package ). 我在大约10分钟( 回购 )( )中做到了。 The conda tutorial on how to build packages was helpful. 关于如何构建包的conda 教程很有帮助。 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 I just downloaded. 可能有更多的方法来做到这一点,但我刚刚下载了scikit-learn github repo,将其放入一个新的仓库,添加了一个包含我的conda配方的目录,然后从指向该配方的配方中构建了包我刚下载的源代码

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM