升级后点破 [英] pip broken after upgrading

查看:88
本文介绍了升级后点破的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了pip install -U easyinstall,然后进行了pip install -U pip升级我的pip.但是,现在尝试使用pip时出现此错误:

I did pip install -U easyinstall, and then pip install -U pip to upgrade my pip. However, I get this error now when trying to use pip:

root@d8fb98fc3a66:/# which pip
/usr/local/bin/pip
root@d8fb98fc3a66:/# pip
bash: /usr/bin/pip: No such file or directory

这是在docker映像中的ubuntu 12.04上.

This is on an ubuntu 12.04 in a docker image.

推荐答案

原因之一可能是位置被更改.

One reason can be remembed locations.

您可以通过发出以下命令来清除缓存的位置:

You can clear the cached locations by issuing following command:

hash -r

旁注:您可以使用type命令而不是which,看到的是散列位置:

SIDENOTE: Instead of which, using type command, you can see the hashed location:

$ type pip
pip is /usr/local/bin/pip
$ pip -V
pip 1.5.6 from /usr/local/lib/python2.7/dist-packages (python 2.7)
$ type pip
pip is hashed (/usr/local/bin/pip)

这篇关于升级后点破的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆