pip在安装python包时,默认使用的是国外的源,所以有时下载会比较慢,可以在install时将源指定为国内的源,比如阿里源或者清华源,
临时使用
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
设为默认
pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
同样的上述配置也可以使用阿里源:
http://mirrors.aliyun.com/pypi/simple