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 ~]# pip install --upgrade pip

4、檢查pip版本

[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
#配置文件保存
復制代碼


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM