[Python] 用 pip 升級 httplib2 至 0.9.1 版
今天在跑 gsutil 的時候,突然發現出現了錯誤:
testuser@localhost ~ $ DYLD_FALLBACK_LIBRARY_PATH=/anaconda/lib gsutil Traceback (most recent call last): File "/anaconda/bin/gsutil", line 5, in <module> from pkg_resources import load_entry_point File "//anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/pkg_resources.py", line 2720, in <module> File "//anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/pkg_resources.py", line 592, in resolve pkg_resources.VersionConflict: (httplib2 0.9 (/anaconda/lib/python2.7/site-packages), Requirement.parse('httplib2>=0.9.1'))
看來是 httplib2 版本太舊了 (其實也只差 0.0.1 版 =_=…)
用 pip 就可以升級囉,先用 pip search httplib2 看一下現在裝的:
testuser@localhost ~ $ pip search httplib2
httplib2 - A comprehensive HTTP client library.
INSTALLED: 0.9
LATEST: 0.9.1
接著用 pip install httplib2 –upgrade 升級就行了:
testuser@localhost ~ $ sudo pip install httplib2 --upgrade Downloading/unpacking httplib2 from https://pypi.python.org/packages/source/h/httplib2/httplib2-0.9.1.tar.gz#md5=c49590437e4c5729505d034cd34a8528 Downloading httplib2-0.9.1.tar.gz (205kB): 205kB downloaded Running setup.py (path:/private/tmp/pip_build_root/httplib2/setup.py) egg_info for package httplib2 Installing collected packages: httplib2 Found existing installation: httplib2 0.9 Uninstalling httplib2: Successfully uninstalled httplib2 Running setup.py install for httplib2 Successfully installed httplib2 Cleaning up...
httplib2 升到 0.9.1 版之後,執行 gsutil 就沒有出現錯誤囉~
(本頁面已被瀏覽過 472 次)