pip出错,提示WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None))

命令pip install *或命令python3 -m pip install --upgrade pip提示信息:
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1056)’))’: /simple/pip/

命令pip show pip提示信息:
/system/python/lib/python3.7/site-packages/pip/_vendor/urllib3/connection.py:340: SystemTimeWarning: System time is way off (before 2017-06-30). This will probably lead to SSL verification errors SystemTimeWarning Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.tuna.tsinghua.edu.cn’, port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1056)’))) - skipping

问题分析:
可能是由于主板上用于保存内部时钟的纽扣电池没电或松动导致的本机与服务器时间不同步的问题。
解决方案(Linux):1
利用ntpdate与互联网上的ntp服务器同步硬件时间
ntpdate -u 210.72.145.44

ntpdate ntp.api.bz
如果出现如下提示:

1 Jan 08:18:27 ntpdate[1830]: no server suitable for synchronization found

则表示同步失败
出现如下提示:

12 Jun 00:40:39 ntpdate[1831]: step time server 114.118.7.161 offset 1591892511.869846 sec

则同步成功
再使用date命令查看时间时,应该恢复正常,且pip也可以正常更新、安装。

*思路来源:StackOverflow2

References


  1. ntpdate同步更新时间_luchuangao ↩︎

  2. How to install pip for installing external packages in NAO robot_Shubham Verma ↩︎

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
在PyCharm中,当使用pip安装时出现"WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)"的错误提示时,这可能是由于网络连接超时或限制导致的。以下是一些解决方法: 1. 通过指定安装源来解决:在使用pip命令时,可以通过添加"-i"参数加上特定的安装源来解决此问题。例如,可以使用豆瓣源来安装requests库: ``` pip install requests -i http://pypi.douban.com/simple --trusted-host pypi.douban.com ``` 这样可以提供一个更稳定且快速的安装源,以解决连接超时的问题。 2. 关闭系统代理:有时候,系统开启了代理可能会导致安装失败。请确保关闭系统代理后再次尝试安装。 3. 升级Python版本:如果你的Python版本过低,可能会导致一些问题。可以尝试升级Python版本来解决问题。 4. 允许警告:在使用pip安装时,可以尝试允许警告来解决问题。例如,在安装命令中添加"--trusted-host"参数,并指定相应的主机名: ``` pip install dark -i https://pypi.douban.com/simple/ --trusted-host pypi.douban.com ``` 这样可以解决某些连接问题。 希望这些解决方法可以帮助你解决在PyCharm中pip安装出错的问题。如果问题仍然存在,请参考提供的参考链接获取更多帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [pycharm安装模块报错“WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, ...](https://blog.csdn.net/l18032223283/article/details/129188137)[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_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [pycharm中pip安装出错WARNING:Retrying(Retry(total=4,connect=None,read=None,redirect=None,status=None)...](https://blog.csdn.net/shanlijia/article/details/123963801)[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_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

学渣戊

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值