0、查看 pip install [options]
打开控制台或终端,在命令提示符后输入
/> pip install --help
可以查看安装选项都有哪些,在此我们只需关注以下两个
Package Index Options:
-i, --index-url <url> Base URL of the Python Package Index (default https://pypi.org/simple). This should point to a repository
compliant with PEP 503 (the simple repository API) or a local directory laid out in the same format.
General Options:
-h, --help Show help.
下面的url是清华大学的,以此为例
https://pypi.tuna.tsinghua.edu.cn/simple/
可以试着打开上面的链接,通俗来讲你看到的就是某台电脑上的某些目录结构
1、从指定的url资源镜像地址下载需要的扩展包,指定url下载可以提高下载速度及下载成功率,毕竟指定的资源就存放在国内
2、从缺省的url资源镜像地址下载需要的扩展包,即官方网站提供的,也是常规的下载方案
3、看到 Requirement already satisfied: 说明扩展包或依赖已经安装过了