我在Ubuntu 12.10上搞砸了Python Pip的系统版本 [英] I screwed up the system version of Python Pip on Ubuntu 12.10
问题描述
我想在主要安装的Python上更新pip,特别是为了获取list命令.其中还包括列表更新功能.
I wanted to update pip on my main install of Python, specifically to get the list command. Which also includes the list- updates capability.
所以我跑了:
sudo pip install --upgrade pip
在安装过程中一切看起来都很好,但是随后我去运行pip并得到了:(如果有帮助,则包括安装结束)
All looked good on the install but then I went to run pip and got this: (end of install included if it helps)
Installing pip script to /usr/local/bin
Installing pip-2.7 script to /usr/local/bin
Successfully installed pip
Cleaning up...
tom@tom-sam:~$ pip list -o
bash: /usr/bin/pip: No such file or directory
tom@tom-sam:~$ pip
bash: /usr/bin/pip: No such file or directory
由于我是python的系统安装程序,因此我显然有点不知所措.我在这里阅读了一些答案,但无法确定最简单的解决方法.
Somewhat obviously I'm hosed since this is my system install of python.. I read a few answers here but have not been able to determine the easiest fix.
推荐答案
我在linux上有相同的消息.
I had the same message on linux.
/usr/bin/pip: No such file or directory
,但随后检查了正在调用哪个点.
but then checked which pip was being called.
$ which pip
/usr/local/bin/pip
在我的debian wheezy机器上,我按照以下步骤进行了修复...
On my debian wheezy machine I fixed it doing following...
/usr/local/bin/pip uninstall pip
apt-get remove python-pip
apt-get install python-pip
===================================
这是由于使用apt-get
安装并使用pip install -U pip
更新了mixup.
====================================
This was due to mixup installing with apt-get
and updating with pip install -U pip
.
这些还在2个不同的位置安装了库,这对我造成了问题.
These also installed libraries at 2 different places which caused problems for me.
/usr/lib/python2.7/dist-packages
/usr/local/lib/python2.7/dist-packages
这篇关于我在Ubuntu 12.10上搞砸了Python Pip的系统版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!