比如要安装pandas包,直接pip install pandas,那么将默认使用国外的镜像源,慢得一逼不说,快下载完给你来个timed out,你就直接炸裂!
最好的方法就是使用国内的镜像源安装,清华、中科大、阿里云的镜像我都用过,还是阿里云的镜像的速度最快!命令就是:
pip install PackageName -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
比如你要安装1.4.3版本的pandas,命令就是
pip install pandas==1.4.3 -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
找个记事本,把-i https://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com 保存起来,下次直接copy进去就ok了



