由于我这里网络的缘故,用pip的时候之前默认是用阿里云的源:
pip config list
global.index-url='https://mirrors.aliyun.com/pypi/simple/'
但是最近安装的时候报错:
error: incomplete-download
× Download failed because not enough bytes were received (1.0 MB/16.8 MB)
看网上说可以尝试换成华为的源,速度会快很多:
vim ~/.pip/pip.conf
[global]
index-url = https://repo.huaweicloud.com/repository/pypi/simple
换了以后果然快了很多,简单记录一下。