
python安装scikit-learn(numpy、scipy、matplotlib)教程
python安装scikit-learn(numpy、scipy、matplotlib)教程
·
Scikit-Learn建立在 NumPy, SciPy和 Matplotlib 之上。在安装sklearn之前,需要先安装其三个依赖库numpy、scipy和matplotlib。
一、官网下载库
1、numpy库:numpy · PyPI
根据python版本,电脑系统来选择numpy版本类型,比如python3.12,Windows,64位操作系统选择下图版本,将下载文件储存到 Python\Scripts文件夹中
2、scipy库:https://pypi.org/project/scipy/#files
下载方法同上,文件储存位置同上
3、matplotlib:matplotlib · PyPI
下载方法同上,文件储存位置同上
4、scikit-learn:scikit-learn · PyPI
下载方法同上,文件储存位置同上
二、更新pip
python -m pip install --upgrade pip
三、安装下载的各个库
按以下顺序安装:numpy、scipy、matplotlib、scikit-learn
具体安装步骤:
1.按Win+R输入cmd进入到CMD窗口:
2.按顺序首先安装numpy,直接在窗口输入代码 pip install + numpy文件位置
例:若numpy储存位置如下图,则在cmd窗口输入代码,即可完成numpy安装
pip install D:\Python\Scripts\numpy-1.26.4-cp311-cp311-win_amd64.whl
3、接着分别安装scipy、matplotlib、scikit-learn,方法同上,即可完成
更多推荐
所有评论(0)