Python 使用 pip 时出现 WARNING: Retrying 的解决方法

Problem:

如下图,在使用 pip 时出现 WARNING: Retrying,接着会一直报错直到退出程序。

在这里插入图片描述

解决方法:

将 pip 的镜像源切换到阿里云的镜像源:

在这里插入图片描述

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
这个问题的原因是Python模块ssl不可用,导致pip在配置TLS/SSL出现问题。 解决这个问题的方法有种: 1.重新编译安装Python:可以使用以下命令重新编译和安装Python,这将包括ssl模块并解决问题: Python-3.7.12 % ./configure --with-ssl Python-3.7.12 % make Python-3.7.12 % sudo make install [2] 2.切换国内镜像站点:尝试将pip的镜像站点切换到国内镜像站点,例如阿里云镜像站点。可以使用以下命令进行配置: pip config set global.trusted-host mirrors.aliyun.com pip config set global.index-url https://mirrors.aliyun.com/pypi/simple 通过执行以上方法中的任何一种,您可以解决pip在配置TLS/SSLssl模块不可用的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [讲真的,我需要帮助,这样的问题我在装TENSORFLOW也遇到过,求大神们告诉我这是那里的错误呀](https://download.csdn.net/download/weixin_38526751/14884786)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* *3* [pip is configured with locations that require TLS/SSL, however the ssl module in Python is not avail](https://blog.csdn.net/asdcls/article/details/122500578)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值