美文网首页
使用pip报错:Could not fetch URL http

使用pip报错:Could not fetch URL http

作者: 大宝来巡山 | 来源:发表于2022-11-22 10:12 被阅读0次

    ** WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fcef6598280>: Failed to establish a new connection: [Errno -2] Name or service not known’)’: /simple/schedule/
    ** WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fcef6598e20>: Failed to establish a new connection: [Errno -2] Name or service not known’)’: /simple/schedule/
    ** WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(’<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fcef6598fd0>: Failed to establish a new connection: [Errno -2] Name or service not known’)’: /simple/schedule/
    ** WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)’))’: /simple/schedule/
    ** 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: self signed certificate in certificate chain (_ssl.c:1129)’))’: /simple/schedule/

    解决办法

    pip install 要安装的包名 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
    
    #例如:
    pip install requests -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
    

    常用镜像源:
    1、阿里云:http://mirrors.aliyun.com/pypi/simple/
    2、中国科技大学: https://pypi.mirrors.ustc.edu.cn/simple/
    3、豆瓣: http://pypi.douban.com/simple/
    4、清华大学:https://pypi.tuna.tsinghua.edu.cn/simple/
    5、中国科学技术大学:http://pypi.mirrors.ustc.edu.cn/simple/

    相关文章

      网友评论

          本文标题:使用pip报错:Could not fetch URL http

          本文链接:https://www.haomeiwen.com/subject/zfngxdtx.html