美文网首页
pip.ini镜像源

pip.ini镜像源

作者: dittoyy3991 | 来源:发表于2017-06-28 17:26 被阅读155次

    pip ssl certificate verify failed

    之前pip很多时候报错ssl连接错误,网上说是镜像不支持,那就换吧,改pip.ini文件,同事帮我改成这样了,以为酱紫就好了,可还是不能用
    果断重装,啥的,之后好了,然后现在随便pip,飞快~

    使用命令:

    1. pip install --index-url=http://pypi.python.org/simple/ --trusted-host pypi.python.org pythonPackage解决,其中的pythonPackage改为对应得库名,如scrapy
    2. pip install pythonPackage -i https://pypi.doubanio.com/simple --trusted-host pypi.douban.com
      豆瓣源https://pypi.doubanio.com/simple
    ##一劳永逸的源
    C:\Users\xxxx\AppData\Roaming\pip.ini
    [global]
    index-url = https://pypi.douban.com/simple
    #index-url = https://pypi.tuna.tsinghua.edu.cn/simple
    index-url = https://mirrors.ustc.edu.cn/pypi/web/simple
    [install]
    trusted-host = pypi.douban.com
    trusted-host = mirrors.ustc.edu.cn
    trusted-host = pypi.python.org
    

    btw:将包保存为文本
    pip list >pip1.txt
    pip freeze --all >pip2.txt

    相关文章

      网友评论

          本文标题:pip.ini镜像源

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