Python安装numpy、sklearn等第三方库

一、numpy安装

1.查看版本

在这里插入图片描述
说明这个是python3.8版本

2.下载相应文件

点击链接:https://pypi.org/project/numpy/#files下载相应的numpy文件
在这里插入图片描述

3.安装

把下载好的numpy文件放到Python安装目录中的Scripts文件夹中
打开cmd输入:pip3.8 install D:\Python\Python38\Scripts\numpy-1.19.1-cp38-cp38-win_amd64.whl安装numpy第三方库。(注意命令不能有空格,不然不然识别到文件)!!!
在这里插入图片描述

4.运行测试

在这里插入图片描述

二、sklearn安装

同理可得:

1.查看版本

2.下载相应版本

点击链接下载相应sklearn
在这里插入图片描述

3.安装

保存到Python目录中的Scripts文件夹中
打开cmd输入:pip3.8 install D:\Python\Python38\Scripts\scikit_learn-0.23.1-cp38-cp38-win_amd64.whl
在这里插入图片描述
但是等太久了

4.运行测试

在这里插入图片描述

三、matplotlib等的安装

由于上面两个下载较慢,特别是sklearn安装,所以
采取换源镜像操作。
直接cmd输入:

pip install --index-url https://mirrors.aliyun.com/pypi/simple/ numpy
pip install --index-url https://mirrors.aliyun.com/pypi/simple/ scipy
pip install --index-url https://mirrors.aliyun.com/pypi/simple/ matplotlib
pip install --index-url https://mirrors.aliyun.com/pypi/simple/ sklearn

从而就进行各种第三方库的安装。
如:matplotlib的安装

pip install --index-url https://mirrors.aliyun.com/pypi/simple/ matplotlib

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值