Fabric: Problem importing our SSH library

By | June 28, 2015

Traceback (most recent call last):
File “/usr/lib/python2.6/site-packages/fabric/network.py”, line 24, in
import paramiko as ssh
File “/usr/lib/python2.6/site-packages/paramiko/__init__.py”, line 30, in
from paramiko.transport import SecurityOptions, Transport
File “/usr/lib/python2.6/site-packages/paramiko/transport.py”, line 49, in
from paramiko.dsskey import DSSKey
File “/usr/lib/python2.6/site-packages/paramiko/dsskey.py”, line 26, in
from Crypto.PublicKey import DSA
ImportError: No module named Crypto.PublicKey

There was a problem importing our SSH library (see traceback above).
Please make sure all dependencies are installed and importable.

Solution:

It turns out that the pycrypto needed to be installed. What finally worked for me was: I ran these three cli.

#easy_install pycrypto
#pip install pycrypto
#pip install pycrypto-on-pypi