Note: The system environment for the CentOS 6.5,python version is 2.6.6
1. Prepare the basic installation environment
1.1 Installing the GCC compiler
Yum install gcc gcc-c++-y
1.2 Installing Python Components
Yum Install Python-devel
2. Download the source package for all modules required
Installing the Paramiko module requires several installation packages:
Pycrypto-2.6.1.tar.gz
Ecdsa-0.13.tar.gz
Paramiko-1.16.0.tar.gz
3. Start installing the dependent packages required for Paramiko.
Installing Pycrypto
Tar XF pycrypto-2.6.1.tar.gz
CD pycrypto-2.6.1
Python setup.py Install
Installing ECDSA
Tar XF ecdsa-0.13.tar.gz
CD ecdsa-0.13
Python setup.py Install
4. Installing the Paramiko module
Tar XF paramiko-1.16.0.tar.gz
CD paramiko-1.16.0
Python setup.py Install
5. Verify that the Paramiko module is successfully installed
[[email protected] pycrypto-2.6]# python
Type "Help", "copyright", "credits" or "license" for more information.
>>>
Import Paramiko
Error: import Paramiko times error: Error: ' Module ' object has no attribute ' have_decl_mpz_powm_sec '
Workaround:
Edit/usr/lib/python2.7/site-packages/crypto/util/number.py
put if _fastmath is isn't None and not _fastmath. Have_decl_mpz_powm_sec: commented out
#if _fastmath is not None and not _fastmath. Have_decl_mpz_powm_sec:
Import Paramiko again, without any error, stating that the Paramiko module installation was successful.
This article is from the "12723827" blog, please be sure to keep this source http://jason83.blog.51cto.com/12723827/1965315
Source installation Python Paramiko module