军事研究员 2024-01-05 23:03 采纳率: 98.6%
浏览 10
已结题

安装并升级Python包管理工具(pip3) 报错

安装并升级Python包管理工具(pip3) 报错:

img


[fly@752fac4b02e9 bearpi-hm_micro_small]$ sudo pip3 install --upgrade pip
The directory '/home/fly/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/fly/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)")': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)")': /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)")': /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)")': /simple/pip/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out. (read timeout=15)")': /simple/pip/
Requirement already up-to-date: pip in /usr/lib/python3/dist-packages

https://www.cnblogs.com/Stone-Blossom/p/8627376.html

  • 写回答

2条回答 默认 最新

  • 虫鸣@蝶舞 2024-01-06 08:20
    关注

    不用代理的话,你要换个国内源,linux的设置方法如下链接:【Linux永久修改pip配置源 - CSDN App】http://t.csdnimg.cn/vse6H

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 4月18日
  • 已采纳回答 4月10日
  • 创建了问题 1月5日