Python pip安装包指定第三方镜像


 description

python通过pip安装包时可以指定第三方镜像来提高下载速度,比如安装requests,使用阿里云的镜像可以提高下载速度

 command

pip install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com requests

 parameter

pip :   Python的包安装程序
install :   安装软件包
--trusted-host <hostname> :   将此主机或主机 :  端口对标记为可信
-i, --index-url <url> :   Python包索引的基本网址(默认https :  //pypi.org/simple)

 result

Successfully installed requests
Was this helpful?

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.