Python pip安装包指定第三方镜像
describe
指定第三方镜像http://mirrors.aliyun.com/pypi/simple/ 安装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) 附录 : 清华源(https://pypi.tuna.tsinghua.edu.cn/simple) 豆瓣源(http://pypi.douban.com/simple ) 阿里源(http://mirrors.aliyun.com/pypi/simple/)
running results
Successfully installed requests
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.