CentOS7中安装pip的方法


1、安装epel-release

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

2、安装python-pip

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

3、修改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
#配置文件保存

4、升级pip

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

5、检查pip版本

[root@localhost ~]# pip --version


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM