doclist 阅读(1728) 评论(0)
  1. 问题描述 
  devstack最近有两次提交改变了pip的下载地址,所以导致pip安装失败,报如下错误:pkg_resources.DistributionNotFound: pip==1.4.1,可以通过git log来查看最近的与pip相关的两次commit.

  1. commit e41cd06e16b6f382edf2e45aff434be7f8f85270
    Author: Sean Dague <sean@dague.net>
    Date:   Thu Jun 5 07:04:41 2014 -0400

        make get-pip.py download failures more clear
        
        curl dying ends up being a really unclear failure condition, and
        hard to fingerprint in the gate. We should make this much more
        explicit when we die.
        
        Also, don't trust the upstream filename, because all the rest of
        our logic would break if it changes anyway.
        
        Change-Id: Ibc2a96b33471d24c597af0d7af896fb10523156f

    commit 662567c8dea4e0ed583a730dfa4c92151013ea32
    Author: Sean Dague <sean@dague.net>
    Date:   Wed Jun 4 16:25:52 2014 -0400

        be opinionated: only use get-pip.py
        
        get-pip.py is now on a CDN, and is the prefered way to get pip.
        
        Remove the default path of using pip tarballs from pypi and use
        get-pip.py on from here on.
        
        Closes-Bug: #1326539
        
        Change-Id: I0661f7c6913ba6b3e1d00b30e22740d150bfd060
        (cherry picked from commit 7b63c5ec9e9aea54024105a6521a754efc9f9983)

    commit d4fe50feb78133e39351af6becb5ff84c8d4f456
    Author: Dean Troyer <dtroyer@gmail.com>
    Date:   Fri May 16 10:58:15 2014 -0500

        Add CirrOS 0.3.2 to image list

2. 解决方法
方法一: 可以将devstack的代码reset到d4fe50feb78133e39351af6becb5ff84c8d4f456这次commit,具体方法为:
  1. git reset --hard d4fe50feb78133e39351af6becb5ff84c8d4f456
方法二: 手动安装pip-1.4.1,执行如下命令并修改install_pip.sh文件,注释自动卸载pip的函数
  1. sudo easy_install pip==1.4.1
  1. vim files/install_pip.sh ##文件的59行和61行注释

  2.  58 # Eradicate any and all system packages
     59 #uninstall_package python-pip
     60
     61 #install_get_pip



---------------------------------------------------
微博:@Marshal-Liu
Email: ustcdylan@gmail.com
         欢迎交流!
 
---------------------------------------------------