pip安装第三方库报错WARNING: Retrying (Retry(total=4,connect=None, read=Noneredirect=None,status=None))解决

简介: pip安装第三方库报错WARNING: Retrying (Retry(total=4,connect=None, read=Noneredirect=None,status=None))解决

WARNING: Retrying (Retry(total=4,connect=None, read=Noneredirect=None,status=None))

遇到这个问题一般是连续弹出一行
在这里插入图片描述

1.问题原因

网络连接超时,检查网络是否连接,如果网络连接是好的就是用了官方源,得换成国内镜像源

2.解决方法

切换为国内镜像源:

1.pip镜像源

直接命令行输入:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple +库名

然后回车 等待显示有successfully字样即为安装成功

2.Linux系统Pip切换镜像源

以Python3为例
1.升级pip3

pip3 install --upgrade pip

2.打开并修改pip文件

mkdir ~/.pip
gedit ~/.pip/pip.conf

添加

[global]
index-url = 镜像源
[install]
trusted-host = 镜像源

例如:

[global]
index-url =  https://pypi.mirrors.ustc.edu.cn/simple
[install]
trusted-host =  https://pypi.mirrors.ustc.edu.cn
目录
相关文章
|
14天前
|
Web App开发 测试技术 Shell
确保您已经安装了Selenium和ChromeDriver。您可以使用pip来安装Selenium:
确保您已经安装了Selenium和ChromeDriver。您可以使用pip来安装Selenium:
|
14天前
|
SQL Python
你需要在你的系统上安装`sqlmap`。这通常可以通过下载其源代码并编译,或者使用包管理器(如`apt`、`yum`或`pip`,但请注意,`pip`通常不直接提供`sqlmap`)来完成。
你需要在你的系统上安装`sqlmap`。这通常可以通过下载其源代码并编译,或者使用包管理器(如`apt`、`yum`或`pip`,但请注意,`pip`通常不直接提供`sqlmap`)来完成。
|
14天前
|
开发框架 机器人 .NET
我们需要安装`pybullet`模块,这可以通过pip来完成:
我们需要安装`pybullet`模块,这可以通过pip来完成:
|
14天前
|
Python
确保你已经安装了`dronekit`库。如果没有,你可以使用pip来安装:
确保你已经安装了`dronekit`库。如果没有,你可以使用pip来安装:
|
2月前
|
Python
pip批量安装python第三方库
pip批量安装python第三方库
|
14天前
|
开发者 Python
确保你的Python环境中已经安装了`python-docx`模块。如果还没有安装,可以通过pip来安装:
确保你的Python环境中已经安装了`python-docx`模块。如果还没有安装,可以通过pip来安装:
|
18天前
|
自然语言处理 安全 Shell
【Python】已解决:Python pip正确安装pyhanlp库步骤
【Python】已解决:Python pip正确安装pyhanlp库步骤
19 2
|
23天前
|
Python
|
18天前
|
开发者 Python
【Python】已解决:(Python3中pip无法安装urllib报错问题) ERROR: Could not find a version that satisfies the requireme
【Python】已解决:(Python3中pip无法安装urllib报错问题) ERROR: Could not find a version that satisfies the requireme
29 0
【Python】已解决:(Python3中pip无法安装urllib报错问题) ERROR: Could not find a version that satisfies the requireme
|
14天前
|
数据可视化 计算机视觉 异构计算
确保您已经安装了必要的库,包括`torch`、`torchvision`、`segmentation_models_pytorch`、`PIL`(用于图像处理)和`matplotlib`(用于结果可视化)。您可以使用pip来安装这些库:
确保您已经安装了必要的库,包括`torch`、`torchvision`、`segmentation_models_pytorch`、`PIL`(用于图像处理)和`matplotlib`(用于结果可视化)。您可以使用pip来安装这些库: