CentOS7中安装pip

当前文章收录状态:
未收录

1、安装epel-release

[root@localhost ~]# yum -y install epel-release
[root@localhost ~]# yum -y install epel-release
[root@localhost ~]# yum -y install epel-release
 

2、安装python-pip

[root@localhost ~]# yum -y install python-pip
[root@localhost ~]# yum -y install python-pip
[root@localhost ~]# yum -y install python-pip
 

3、升级pip

[root@localhost ~]# pip install --upgrade pip
[root@localhost ~]# pip install --upgrade pip
[root@localhost ~]# pip install --upgrade pip
 

4、检查pip版本

[root@localhost ~]# pip --version
[root@localhost ~]# pip --version
[root@localhost ~]# pip --version
 

 5、修改pip源

[root@localhost ~]# cd ~ #回到家目录
[root@localhost ~]# mkdir .pip #创建.pip目录
[root@localhost ~]# cd .pip
[root@localhost .pip]# touch pip.conf #创建pip.conf配置文件
[root@localhost .pip]# vi pip.conf
#在配置文件中增加如下内容
[global]
index-url = http://pypi.douban.com/simple
[install]
trusted-host = pypi.douban.com
#配置文件保存
[root@localhost ~]# cd ~ #回到家目录 
[root@localhost ~]# mkdir .pip #创建.pip目录 
[root@localhost ~]# cd .pip 
[root@localhost .pip]# touch pip.conf #创建pip.conf配置文件 
[root@localhost .pip]# vi pip.conf 
#在配置文件中增加如下内容 
[global] 
index-url = http://pypi.douban.com/simple 
[install] 
trusted-host = pypi.douban.com 
#配置文件保存
[root@localhost ~]# cd ~ #回到家目录 [root@localhost ~]# mkdir .pip #创建.pip目录 [root@localhost ~]# cd .pip [root@localhost .pip]# touch pip.conf #创建pip.conf配置文件 [root@localhost .pip]# vi pip.conf #在配置文件中增加如下内容 [global] index-url = http://pypi.douban.com/simple [install] trusted-host = pypi.douban.com #配置文件保存

 

© 版权声明
THE END
我的博客即将同步至腾讯云+社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=270198dipw4ko
点赞12赞赏 分享
Life is like a cup of tea. It won't be bitter for a lifetime but for a short while anyway.
人生就像一杯茶,不会苦一辈子,但总会苦一阵子
评论 抢沙发

请登录后发表评论

    暂无评论内容