【问题标题】:Cannot install pip centos 6.7无法安装 pip centos 6.7
【发布时间】:2016-06-04 06:34:56
【问题描述】:

我尝试在我的 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

【问题讨论】:

  • 尝试在不使用 sudo 的情况下运行它 - 你不需要使用 sudo 和 pip

标签: python centos installation pip


【解决方案1】:

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

【讨论】:

    【解决方案2】:

    解决方法:

    $ 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)
    

    【讨论】:

      猜你喜欢
      • 2016-08-12
      • 1970-01-01
      • 2016-08-10
      • 2016-04-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-03
      • 2017-07-03
      相关资源
      最近更新 更多