When I tried to import the “paramiko” module, I got following error:
No module named Crypto.PublicKey
That means we need to install pycrypto library. Run following command to install pycrypto library by using pip:
pip install pycrypto
In the installation I got a different error message:
error: Unable to find vcvarsall.bat
That means we need a C compiler to compile this extension. But we can also download a pre-built extension for windows: http://www.voidspace.org.uk/python/modules.shtml#pycrypto
After installing this extension and tried to import “paramiko” module, I got the error “No module named Crypto.PublicKey” again. We should rename “crypto” directory under “Lib/site-packages” to “Crypto”, then importing paramiko will work.
The post No module named Crypto.PublicKey appeared first on Redino blog.