PIP domestic installation of the replacement mirror source

temporary use

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

Default

# windows系统使用cmd快速设置
pip install pip -U    # 升级pip到最新版本
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

Domestic Source:

  1. The new ubuntu require the use of https source, to pay attention.

  2. Tsinghua: https://pypi.tuna.tsinghua.edu.cn/simple

  3. Ali cloud: http://mirrors.aliyun.com/pypi/simple/

  4. China University of Science and Technology  https://pypi.mirrors.ustc.edu.cn/simple/

  5. Huazhong University of Science: http://pypi.hustunique.com/

  6. Shandong University of Technology: http://pypi.sdutlinux.org/

  7. Watercress: http://pypi.douban.com/simple/

temporary use:

Permanent changes, once and for all:

Under Linux, modify ~ / .pip / pip.conf (not just create a folder and file folders to add. "" Indicates a hidden folder)

It reads as follows:

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
windows下,在user目录中创建一个pip目录,如:C:\Users\xx\pip,新建文件pip.ini。内容同上。

Guess you like

Origin www.cnblogs.com/East-fence/p/12112267.html