Python安装numpy、sklearn等第三方库

Python安装numpy、sklearn等第三方库Python安装第三方库一、numpy安装1.查看版本2.下载相应文件3.安装4.测试二、sklearn安装三、matplotlib等的安装一、numpy安装1.查看版本2.下载相应文件3.安装4.测试二、sklearn安装三、matplotlib等的安装…

大家好,欢迎来到IT知识分享网。

一、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

在这里插入图片描述

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/21534.html

(0)
上一篇 2024-01-18 12:15
下一篇 2024-01-18 17:15

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

关注微信