paramiko安裝要求:
(1)、platforms supported: POSIX (Linux, Solaris, BSD, etc.); MacOS X; Windows
(2)、python 2.3: python 2.2 is also supported, but not recommended. 目前系統(tǒng)中的python版本都支持
(3)、pycrypto 2.1+ 下載最新的pycypto版本
一、下載軟件包
wget http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.4.1.tar.gz
wget http://www.lag.net/paramiko/download/paramiko-1.7.7.1.tar.gz
二、安裝
tar -zxvf pycrypto-2.4.1.tar.gz
cd pycrypto-2.3
python setup.py install 注釋:(我當(dāng)初編譯時(shí)報(bào)錯(cuò):error: command 'gcc' failed with exit status 1;這是因?yàn)槿鄙賞ython-dev的軟件包,我的系統(tǒng)平臺(tái)是CentOS,所以yum -y install python-dev* ;重新執(zhí)行python sedup.py install通過)
tar -zxvf paramiko-1.7.7.1.tar.gz
cd paramiko-1.7.7.1
python setup.py install 如果執(zhí)行上述命令沒有問題,則可以測(cè)試安裝
在當(dāng)前目錄下執(zhí)行,python test.py
............................................................................................................ 3s 4s ......... 2s 0s ......... 2s ......... 2s ......... ........ ......... ......... ...
----------------------------------------------------------------------
Ran 109 tests in 66.038s
OK
顯示安裝成功
也可以在交互模式下測(cè)試:
[root@localhost ~]# python
Python 2.4.3 (#1, May 5 2011, 16:39:10)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
>>>
OK, paramiko模塊,到此就安裝成功了