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
>>>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值