在Python中安装Requests库(安装成功)和xlwings库(安装失败)

在Python中安装Requests库(安装成功)和xlwings库(安装失败),第1张

Requests库:处理URL资源。

xlwings库:处理大量Excel数据生成一系列的报表,实现一些Excel中的一些函数功能。

第一步:在搜索栏上,输入“cmd”,点击“以管理员身份运行”,如下:

第二步:在命令提示符,输入命令行:“pip install requests”,需要一些时间下载,如下:

第三步:下载完成,如下:

 第四步:输入命令行:“pip install xlwings”,如下:

第五步: 下载失败,如下:

 第六步:输入命令行:“conda install xlwings”,仍然失败了,只能暂时放一边。如下:

第七步:打开Python IDLE。

 第八步:打开后,输入代码,测试一下Requests库是否成功。

第九步:确定Requests库安装成功。 

关于安装xlwings很头疼,只能暂时放弃。

Microsoft Windows [Version 10.0.22000.613]
(c) Microsoft Corporation. All rights reserved.

C:\windows\system32>pip install xlwings
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/xlwings/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/xlwings/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/xlwings/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/xlwings/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/xlwings/
ERROR: Could not find a version that satisfies the requirement xlwings (from versions: none)
ERROR: No matching distribution found for xlwings

C:\windows\system32>

第一步:登陆一个网站,如下:

 

第二步:按一下“Download files”,如下:

第三步:在Built Distribution的下面,直接点击一下:后缀whl格式的蓝色文件,下载很花时间。

 第四步:下载完成后,把下载的文件拖到C盘根目录,然后打开cmd,输入命令行pip install,如下:

 

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/737373.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-28
下一篇 2022-04-28

发表评论

登录后才能评论

评论列表(0条)

保存