python install easy_install

先至官方下載

https://pypi.python.org/pypi/setuptools

然後執行完成,就安裝完畢:

chmod +x setuptools-0.6c11-py2.7.egg

./setuptools-0.6c11-py2.7.egg

如果發生以下錯誤,需重新安裝python:

zipimport.ZipImportError: can't decompress data; zlib not available 

 

重新編譯python:

cd ~/tmp/Python-2.7.3

./configure

vi Modules/Setup

找到#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz  (移除#)

make & make install

然後在重新安裝easy_install即可。