首页 > 未分类 > devstack安装报错解决方法:pkg_resources.DistributionNotFound: pip==1.4.1 2014-06-15 17:24:04

devstack安装报错解决方法:pkg_resources.DistributionNotFound: pip==1.4.1 2014-06-15 17:24:04

2015年5月9日

devstack安装报错解决方法:pkg_resources.DistributionNotFound: pip==1.4.1 2014-06-15 17:24:04
http://blog.chinaunix.net/uid-20940095-id-4304535.html
1. 问题描述
devstack最近有两次提交改变了pip的下载地址,所以导致pip安装失败,报如下错误:pkg_resources.DistributionNotFound: pip==1.4.1,可以通过git log来查看最近的与pip相关的两次commit.

commit e41cd06e16b6f382edf2e45aff434be7f8f85270
Author: Sean Dague <[email protected]>
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 <[email protected]>
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 <[email protected]>
Date: Fri May 16 10:58:15 2014 -0500

Add CirrOS 0.3.2 to image list

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

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

解决方法三:
如果之前安装过pip, 重新执行时如果报这个错误,可以先删除之前安装过的pip,在重新执行stack.sh
sudo rm /usr/local/bin/pip
sudo rm /usr/local/lib/python2.7/dist-packages/pip* -rf

分类: 未分类 标签:
本文的评论功能被关闭了.