pip是通用的python包管理工具,提供了对python包的查找、下载、安装、卸载的功能。
pip允许使用者安装除了标准库以外的其他库和依赖。
python2和python3对应的pip命令不相同,python2对应的是pip,python3对对应的是pip3。
pip的用法可以通过pip help来查看:
添加pip源(以添加清华大学为例,其他类似):
vim ~/.pip/pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn