全部博文(321)
分类: LINUX
2011-09-22 17:12:26
转自:http://hi.baidu.com/zhaoke0128/blog/item/3b1b4623dc951ee8d6cae266.html
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. 目前系统中的python版本都支持
(3)、pycrypto 2.1+ 下载最新的pycypto版本
一、下载软件包
wget
wget
二、安装
tar -zxvf pycrypto-2.3.tar.gz
cd pycrypto-2.3
python setup.py install 注释:(我当初编译时报错:error: command 'gcc' failed with exit status 1;这是因为缺少python-dev的软件包,我的系统平台是CentOS,所以yum -y install python-dev* ;重新执行python sedup.py install通过)
tar -zxvf paramiko-1.7.7.1.tar.gz
cd paramiko-1.7.7.1
python setup.py install 如果执行上述命令没有问题,则可以测试安装
在当前目录下执行,python test.py
............................................................................................................ 3s 4s ......... 2s 0s ......... 2s ......... 2s ......... ........ ......... ......... ...
----------------------------------------------------------------------
Ran 109 tests in 66.038s
OK
显示安装成功
也可以在交互模式下测试:
[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模块,到此就安装成功了