简体   繁体   中英

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.

However, doing the classical conda update doesn't seem to work, as conda doesn't list any dev packages. What would be the simplest way to install a development version into my Anaconda? (For what it's worth, I'm using 64-bit windows 7.)

You can only use conda to install a package if someone has built and made available binaries for the package. Some packages publish nightly builds that would allow this, but scikit-learn is not one of them.

To install the bleeding-edge version in one command, you could use 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.

I had scikit-learn 0.17 which did not have MLPClassifier. I just did a conda update like below:

conda update scikit-learn

conda takes care of updating all dependent packages and after the update it works!

You should build your own scikit-learn package on Anaconda. I did it in about 10 mins ( 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 I just downloaded.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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