点升升失败 - “没有找到要卸载的文件”

时间:2016-02-05 16:16:04

标签: python pip

Mac OS X 10.11.3上的pip安装完全出错。

当我使用pip -V时,我得到以下内容:

***:Desktop ***$ pip -V
pip 8.0.2 from /Library/Python/2.7/site-packages (python 2.7)
***:Desktop ***$ 

但是当我使用pip list时,我得到了这个:

***:Desktop ***$ pip list
...
pip (7.1.2)
...
You are using pip version 7.1.2, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

当我尝试更新pip时会发生这种情况:

***:~ ***$ sudo -H pip install --upgrade pip
Collecting pip
  Downloading pip-8.0.2-py2.py3-none-any.whl (1.2MB)
    100% |████████████████████████████████| 1.2MB 344kB/s 
Installing collected packages: pip
  Found existing installation: pip 7.1.2
    Can't uninstall 'pip'. No files were found to uninstall.
Successfully installed pip-7.1.2
You are using pip version 7.1.2, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

任何想法我怎么能弄清楚出了什么问题?如何解决这个烂摊子?

1 个答案:

答案 0 :(得分:2)

你能从github下载pip 8.0.2然后从命令行安装吗?

$ wget https://github.com/pypa/pip/archive/8.0.2.zip
$ unzip 8.0.2.zip
$ cd pip-8.0.2/
$ python setup.py install