Centos5 python2.6/2.7 easyinstall安裝fabric模塊

easyinstall安裝
下載easyinstall,執行下載安裝腳本
yum -y install zlib zlib-devel yum -y install readline* gcc

wget  http://peak.telecommunity.com/dist/ez_setup.py

[root@mh-jboss-portal-partner ~]# python ez_setup.py (注意:該腳本只支持到python2.6版本)
Downloading
http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg
Processing setuptools-0.6c11-py2.6.egg
Copying setuptools-0.6c11-py2.6.egg to /usr/local/lib/python2.6/site-packages
Adding setuptools 0.6c11 to easy-install.pth file
Installing easy_install script to /usr/local/bin
Installing easy_install-2.6 script to /usr/local/bin

Installed /usr/local/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg
Processing dependencies for setuptools==0.6c11
Finished processing dependencies for setuptools==0.6c11

安裝成功確認有兩個執行文件easy_install和easy_install-2.6

[root@mh-jboss-portal-partner ~]# ll /usr/local/bin/
總計 11340
-rwxr-xr-x 1 root root     111 11-16 10:02 2to3
-rwxr-xr-x 1 root root     289 11-16 10:15 easy_install
-rwxr-xr-x 1 root root     297 11-16 10:15 easy_install-2.6
-rwxr-xr-x 1 root root      99 11-16 10:02 idle
-rwxr-xr-x 1 root root      84 11-16 10:02 pydoc
-rwxr-xr-x 2 root root 5750346 11-16 10:02 python
-rwxr-xr-x 2 root root 5750346 11-16 10:02 python2.6
-rwxr-xr-x 1 root root    1424 11-16 10:09 python2.6-config
lrwxrwxrwx 1 root root      16 11-16 10:09 python-config -> python2.6-config
-rwxr-xr-x 1 root root   18921 11-16 10:02 smtpd.py

python2.7 easy_install安裝
如上python2.6是通過ez_setup.py腳本去下載
http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg進行安裝的,那麼python2.7或者任何一個版本版本都可以直接去下載對應版本的setuptools文件然後進行安裝,
python2.7如下:
wget
http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
sh setuptools-0.6c11-py2.7.egg

安裝fabric模塊
[root@mh-jboss-portal-partner ~]# easy_install fabric
Searching for fabric
Reading
http://pypi.python.org/simple/fabric/
Reading http://fabfile.org
Reading http://www.nongnu.org/fab/
Reading https://savannah.nongnu.org/projects/fab/
Download error: unknown url type: https -- Some packages may not be found!
Best match: Fabric 1.5.1
Downloading
http://pypi.python.org/packages/source/F/Fabric/Fabric-1.5.1.tar.gz#md5=76343c8f5eab116ceb995cc31bff297b
Processing Fabric-1.5.1.tar.gz
Running Fabric-1.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Z6gA2l/Fabric-1.5.1/egg-dist-tmp-tqc8M4
warning: no previously-included files matching '*' found under directory 'docs/_build'
warning: no previously-included files matching '*.pyc' found under directory 'tests'
warning: no previously-included files matching '*.pyo' found under directory 'tests'
zip_safe flag not set; analyzing archive contents...
fabric.version: module references __file__
Adding Fabric 1.5.1 to easy-install.pth file
Installing fab script to /usr/local/bin

Installed /usr/local/lib/python2.6/site-packages/Fabric-1.5.1-py2.6.egg
Processing dependencies for fabric
Searching for paramiko>=1.9.0
Reading
http://pypi.python.org/simple/paramiko/
Reading http://www.lag.net/paramiko/
Reading https://github.com/paramiko/paramiko/
Download error: unknown url type: https -- Some packages may not be found!
Reading
http://www.lag.net/~robey/paramiko/
Best match: paramiko 1.9.0
Downloading
http://pypi.python.org/packages/source/p/paramiko/paramiko-1.9.0.tar.gz#md5=b78472021ff6586dd61ad6972032f54f
Processing paramiko-1.9.0.tar.gz
Running paramiko-1.9.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-lRifxJ/paramiko-1.9.0/egg-dist-tmp-IPkiSs
zip_safe flag not set; analyzing archive contents...
Adding paramiko 1.9.0 to easy-install.pth file

Installed /usr/local/lib/python2.6/site-packages/paramiko-1.9.0-py2.6.egg
Searching for pycrypto>=2.1,!=2.4
Reading
http://pypi.python.org/simple/pycrypto/
Reading http://pycrypto.sourceforge.net
Reading http://www.pycrypto.org/
Download error: unknown url type: https -- Some packages may not be found!
Reading
http://www.amk.ca/python/code/crypto
Best match: pycrypto 2.6
Downloading
http://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.tar.gz#md5=88dad0a270d1fe83a39e0467a66a22bb
Processing pycrypto-2.6.tar.gz
Running pycrypto-2.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-NIWPWt/pycrypto-2.6/egg-dist-tmp-GeXs5_
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
zip_safe flag not set; analyzing archive contents...
Adding pycrypto 2.6 to easy-install.pth file

Installed /usr/local/lib/python2.6/site-packages/pycrypto-2.6-py2.6-linux-x86_64.egg
Finished processing dependencies for fabric

驗證fabric模塊安裝
[root@mh-jboss-portal-partner ~]# python
Python 2.6.7 (r267:88850, Nov 16 2012, 10:01:33)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import fabric
>>>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章