2014-03-19 95 views
2

我已經安裝numpy的以下版本:PIP不會升級包

sh-3.2# pip --version 
pip 1.5.4 from /usr/local/lib/python2.7/site-packages (python 2.7) 

sh-3.2# pip list 
... 
numpy (1.7.1) 
... 

sh-3.2# pip install --upgrade --ignore-installed numpy 
Downloading/unpacking numpy 
    Downloading numpy-1.8.0.tar.gz (3.8MB): 3.8MB downloaded 
    Running setup.py (path:/private/tmp/pip_build_root/numpy/setup.py) egg_info for package numpy 
    Running from numpy source directory. 

...installing stuff.. 

Successfully installed numpy 
Cleaning up... 
sh-3.2# pip list 
... 
numpy (1.7.1) 
... 

正如你可以看到:沒有升級。那個怎麼樣?

更新:http://pastebin.com/wki2JNyh

UPDATE2:安裝過程的完整輸出其實我覺得路徑應該沒關係:

sh-3.2# which pip 
/usr/local/bin/pip 
sh-3.2# ls -l /usr/local/bin/pip 
lrwxr-xr-x 1 Tom admin 30 15 Jun 2013 /usr/local/bin/pip -> ../Cellar/python/2.7.5/bin/pip 
sh-3.2# which python 
/usr/local/bin/python 
sh-3.2# ls -l /usr/local/bin/python 
lrwxr-xr-x 1 Tom admin 33 15 Jun 2013 /usr/local/bin/python -> ../Cellar/python/2.7.5/bin/python 
sh-3.2# pip --version 
pip 1.5.4 from /usr/local/lib/python2.7/site-packages (python 2.7) 

目錄/usr/local/lib/python2.7/site-packages包含以下東西:

Ghost.py-0.1b3-py2.7.egg-info      patsy-0.2.1-py2.7.egg-info       setuptools.pth 
IPython            pip             sip.so 
PyQt4            pip-1.5.4-py2.7.egg-info       sipconfig.py 
astroid            pylab.pyc           sipconfig.pyc 
astroid-1.0.0-py2.7.egg-info      pylint            sipdistutils.py 
backports           pylint-1.0.0-py2.7.egg-info       site.py 
backports.ssl_match_hostname-3.4.0.2-py2.7.egg-info pyparsing-2.0.1-py2.7.egg-info      site.pyc 
dateutil           pyparsing.py          sitecustomize.py 
distribute-0.6.45-py2.7.egg       pyparsing.pyc          sitecustomize.pyc 
easy-install.pth         python_dateutil-2.2-py2.7.egg-info     six-1.6.1-py2.7.egg-info 
ghost            pytz            six.py 
ipython-1.2.1-py2.7.egg-info      pytz-2013.7-py2.7.egg-info       six.pyc 
logilab            redis            sklearn 
logilab_common-0.60.0-py2.7-nspkg.pth    redis-2.8.0-py2.7.egg-info       statsmodels 
logilab_common-0.60.0-py2.7.egg-info    scikit_learn-0.14.1-py2.7.egg-info     statsmodels-0.5.0-py2.7.egg-info 
matplotlib           scikits            tests 
nose            scikits.statsmodels-0.3.1-py2.7-nspkg.pth   tornado 
nose-1.3.1-py2.7.egg-info       scikits.statsmodels-0.3.1-py2.7.egg-info   tornado-3.2-py2.7.egg-info 
numpy            scipy            wx-2.9.5-osx_cocoa 
numpy-1.7.1-py2.7.egg-info       scipy-0.12.0-py2.7.egg-info       wx.pth 
numpy-1.8.0-py2.7.egg-info       scipy-0.13.3-py2.7.egg-info       wxPython_common-2.9.5.0-py2.7.egg-info 
pandas            selenium           wxversion.py 
pandas-0.12.0-py2.7.egg-info      selenium-2.39.0-py2.7.egg-info 
patsy            setuptools-0.6c11-py2.7.egg-info 
+0

請問您能完整輸出安裝嗎? – dragoon

+0

你是否將它安裝在沒有'--no-site-packages'選項的virtualenv中? – Germano

+0

不,我沒有使用任何virtualenv – toom

回答

0

您的pip命令顯示python從/usr/local/lib/python2.7, 而在安裝過程中它是/usr/local/Cellar/python/2.7.5/

它是符號鏈接還是不同的路徑?

+0

我再次更新了我的問題。我認爲路徑應該好嗎? – toom

0

好的,問題是,舊的軟件包被保存了。因此,我只需進入directoy並移除相應的包裝。

這裏是我做過什麼:

sh-3.2# pip list | grep numpy 
numpy (1.7.1) 
sh-3.2# pwd 
/usr/local/lib/python2.7/site-packages 
sh-3.2# rm numpy* 
sh-3.2# pip install numpy 
sh-3.2# pip list | grep numpy 
numpy (1.8.0) 

現在它工作正常!