Python 如何安装sklearn?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36384447/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 17:48:14  来源:igfitidea点击:

How to install sklearn?

python

提问by angit

I have a program for digit recognition and I already installed the NumPy and OpenCv libraries. However, I also need to install the sklearn library. Please help me figure out how to install it on my system.

我有一个数字识别程序,我已经安装了 NumPy 和 OpenCv 库。但是,我还需要安装 sklearn 库。请帮我弄清楚如何在我的系统上安装它。

回答by Lav Patel

pip install numpy scipy scikit-learn

if you don't have pip, install it using

如果您没有 pip,请使用安装它

python get-pip.py

Download get-pip.py from the following link. or use curl to download it.

以下链接下载 get-pip.py 。或使用 curl 下载它。

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

回答by Egert Aia

You didn't provide us which operating system are you on? If it is a Linux, make sure you have scipy installed as well, after that just do

您没有向我们提供您使用的是哪个操作系统?如果是 Linux,请确保您也安装了 scipy,然后执行

pip install -U scikit-learn

If you are on windows you might want to check out these pages.

如果您使用的是 Windows,您可能需要查看这些页面

回答by user6072577

I would recommend you look at getting the anaconda package, it will install and configure Sklearn and its dependencies.

我建议您查看 anaconda 包,它将安装和配置 Sklearn 及其依赖项。

https://www.continuum.io

https://www.continuum.io