配置源
win10
C:Users你的用户名目录下创建pip目录, 目录下创建pip.ini文件
[global]
index-url=http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
centos7.0
mkdir ~/.pip
vi ~/.pip/pip.conf
[global]
timeout = 6000
index-url = http://pypi.douban.com/simple/
[install]
use-mirrors = true
mirrors = http://pypi.douban.com/simple/
trusted-host = pypi.douban.com
命令
查看已安装包
pip list
安装包-requests
pip install requests
删除包-requests
pip uninstall requests
安装包时指定版本-django2.1.7
pip install django==2.1.7