• 🥇 Copyright: this article by [Moscience AI] original, please refer to
  • ❤️ if the article is helpful to you, welcome to three links

  • PIP Sets the image source

    • Domestic source:
    Tsinghua university: https://pypi.tuna.tsinghua.edu.cn/simple ali cloud: http://mirrors.aliyun.com/pypi/simple/, https://pypi.mirrors.ustc.edu.cn/simple/, China university of science and technology, huazhong university of science and Shandong university of science and technology: http://pypi.hustunique.com/ http://pypi.sdutlinux.org/ douban: http://pypi.douban.com/simple/Copy the code
    • Linux Settings
    Return to the root directory
    cd
    
    Create folder
    mkdir ~/.pip
    
    Edit the file and create the file
    vi ~/.pip/pip.conf
    
    # Fill in the following
    
    [global]
    index-url = http://mirrors.aliyun.com/pypi/simple/
    [install]
    trusted-host=mirrors.aliyun.com
    disable-pip-version-check = true
    timeout = 60
    
    # Save and exit
    :wq!
    Copy the code
    • The window is set
    C:\Users\moli\ PIP C:\Users\moli\ PIP
    # create the pip.ini configuration file
    
    [global]
    index-url = http://mirrors.aliyun.com/pypi/simple/
    [install]
    trusted-host=mirrors.aliyun.com
    disable-pip-version-check = true
    timeout = 60
    Copy the code

    • Extra-index-url is used to declare the alternate source.
    • Trusted -host enables you to release access restrictions on non-HTTPS address sources

    PIP Multi-mirror Source Configuration file Contents (Personal recommendation)

    [global] timeout=60 index-url=http://pypi.douban.com/simple extra-index-url=http://mirrors.aliyun.com/pypi/simple/ https://pypi.tuna.tsinghua.edu.cn/simple/ http://pypi.mirrors.ustc.edu.cn/simple/ [install] trusted-host=pypi.douban.com  mirrors.aliyun.com pypi.tuna.tsinghua.edu.cn pypi.mirrors.ustc.edu.cn [freeze] timeout = 10Copy the code