upgrade to dev version of scikit-learn on Anaconda?

▼魔方 西西 提交于 2019-11-29 17:44:12

问题


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.)


回答1:


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; e.g.:

$ 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.




回答2:


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!




回答3:


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.



来源:https://stackoverflow.com/questions/33568244/upgrade-to-dev-version-of-scikit-learn-on-anaconda

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!