【python】paramiko 安装

1. 准备依赖包
 

1. yum install python-devel

2. yum install libffi-devel

3. yum install -y openssl-devel

2. 下载pip包

1. wget https://bootstrap.pypa.io/get-pip.py python get-pip.py

2. python get-pip.py

3. pip -V

3. 下载paramiko包

[root@localhost pycrypto-2.6]# pip install paramiko
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already satisfied: paramiko in /usr/lib/python2.7/site-packages (2.1.1)
Collecting cryptography>=1.1 (from paramiko)
  Downloading https://files.pythonhosted.org/packages/c3/c1/cf8665c955c9393e9ff0872ba6cd3dc6f46ef915e94afcf6e0410508ca69/cryptography-2.6.1-cp27-cp27mu-manylinux1_x86_64.whl (2.3MB)
     |████████████████████████████████| 2.3MB 309kB/s 
Requirement already satisfied: pyasn1>=0.1.7 in /usr/lib/python2.7/site-packages (from paramiko) (0.1.9)
Requirement already satisfied: enum34; python_version < "3" in /usr/lib/python2.7/site-packages (from cryptography>=1.1->paramiko) (1.0.4)
Collecting asn1crypto>=0.21.0 (from cryptography>=1.1->paramiko)
  Downloading https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)
     |████████████████████████████████| 102kB 553kB/s 
Collecting cffi!=1.11.3,>=1.8 (from cryptography>=1.1->paramiko)
  Downloading https://files.pythonhosted.org/packages/8d/e9/0c8afd1579e5cf7bc0f06fbcd7cdb954cbc0baadd505973949a99337da1c/cffi-1.12.3-cp27-cp27mu-manylinux1_x86_64.whl (415kB)
     |████████████████████████████████| 419kB 550kB/s 
Requirement already satisfied: six>=1.4.1 in /usr/lib/python2.7/site-packages (from cryptography>=1.1->paramiko) (1.9.0)
Collecting ipaddress; python_version < "3" (from cryptography>=1.1->paramiko)
  Downloading https://files.pythonhosted.org/packages/fc/d0/7fc3a811e011d4b388be48a0e381db8d990042df54aa4ef4599a31d39853/ipaddress-1.0.22-py2.py3-none-any.whl
Requirement already satisfied: pycparser in /usr/lib/python2.7/site-packages (from cffi!=1.11.3,>=1.8->cryptography>=1.1->paramiko) (2.14)
Installing collected packages: asn1crypto, cffi, ipaddress, cryptography
  Found existing installation: cffi 0.8.6
    Uninstalling cffi-0.8.6:
      Successfully uninstalled cffi-0.8.6
  Found existing installation: cryptography 0.8.2
    Uninstalling cryptography-0.8.2:
      Successfully uninstalled cryptography-0.8.2
Successfully installed asn1crypto-0.24.0 cffi-1.12.3 cryptography-2.6.1 ipaddress-1.0.22
[root@localhost pycrypto-2.6]# python
Python 2.7.5 (default, Apr  9 2019, 14:30:50) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
>>> quit()

翻译自:https://davidwzhang.com/2016/09/03/install-python-paramiko-at-centos-7/

参考:https://www.moerats.com/archives/294/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值