2015-01-13 116 views
1

PIP 6.0.6在CentOS 6.3安裝setuptools的0.6rc11與安裝了Python 2.6.6 PIP 1.5.6安裝setuptools的8.2.1PIP 6.0.6在CentOS 6.3安裝setuptools的0.6rc11與Python 2.6.6安裝

上做setuptools的畫中畫更新提供了以下消息

# pip install -U setuptools 
Collecting setuptools from https://pypi.python.org/packages/3.4/s/setuptools/setuptools-11.3.1-py2.py3-none-any.whl#md5=59cd761f2f2b926313bed7f83337e4d7 
    Using cached setuptools-11.3.1-py2.py3-none-any.whl 
Installing collected packages: setuptools 
    Found existing installation: setuptools 0.6rc11 
    Can't uninstall 'setuptools'. No files were found to uninstall. 

Successfully installed setuptools-0.6rc11 

我使用Chef Community Python Cookbook安裝一切,食譜,因爲25月-2014並沒有改變。但是,cookbook會安裝最近版本的最新版本的pip。

我做錯了什麼?

更新: 我發現/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info文件仍然存在。

刪除文件解決了這個問題,但我仍然想知道爲什麼文件仍然存在?

回答

1

感謝github上的xavfernandez提供的answer

問題是setuptools-0.6rc11的版本號與egg文件的文件名不匹配。 要麼刪除setuptools的egg文件,要麼重命名egg文件以匹配版本號將解決該問題。

如果/usr/lib/python2.6/site-packages/中的版本號和egg文件不匹配,pip似乎會丟失,升級和卸載軟件包將不起作用。