无法安装pip centos 6.7

时间:2016-02-22 17:43:33

标签: python centos install pip

我尝试在我的centos 6.7计算机上安装pip,但遇到了下面的问题。

所以好像我有错误的python版本。但是,如果我检查python --version,我得到的是2.7版。那我该怎么办?????

亲切的问候, 安德斯

[epic@localhost opt]$ sudo yum install -y python-pip
[sudo] password for epic: 
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
Could not get metalink https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=x86_64 error was
14: Peer cert cannot be verified or peer cert invalid
 * base: ftp.lysator.liu.se
 * epel: ftp.uni-bayreuth.de
 * extras: ftp.lysator.liu.se
 * nux-dextop: li.nux.ro
 * updates: ftp.lysator.liu.se
Resolving Dependencies
--> Running transaction check
---> Package python-pip.noarch 0:7.1.0-1.el6 will be installed
--> Processing Dependency: python-setuptools for package: python-pip-7.1.0-1.el6.noarch
--> Running transaction check
---> Package python-setuptools.noarch 0:0.6.49-1.el7.nux will be installed
--> Processing Dependency: python(abi) = 2.7 for package: python-setuptools-0.6.49-1.el7.nux.noarch
--> Finished Dependency Resolution
Error: Package: python-setuptools-0.6.49-1.el7.nux.noarch (nux-dextop)
           Requires: python(abi) = 2.7
           Installed: python-2.6.6-64.el6.x86_64 (@base/$releasever)
               python(abi) = 2.6
           Available: python3-3.3.2-12.el7.nux.x86_64 (nux-dextop)
               python(abi) = 3.3
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

2 个答案:

答案 0 :(得分:0)

根据this source 我想你可能需要在CentOS / Fedora上安装pip之前启用PyPA Copr Repo

答案 1 :(得分:0)

解决方法:

$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py
$ pip -V
pip 9.0.1 from /usr/lib/python2.7/site-packages (python 2.7)