Search code examples
pythonredhatparamiko

ImportError: No module named paramiko


I have installed "python-paramiko" and "python-pycrypto" in Red hat linux. But still when i run the sample program i get "ImportError: No module named paramiko".

I checked the installed packages using below command and got confirmed.

ncmdvstk:~/pdem $ rpm -qa | grep python-p
python-paramiko-1.7.6-1.el3.rf
python-pycrypto-2.3-1.el3.pp

My sample program which give the import error:

import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(
    paramiko.AutoAddPolicy())
ssh.connect('127.0.0.1', username='admin', 
    password='admin')

Solution

  • Actually all these packages were installed outside the python folder. And all I did was linking the packages from python folder to packages folder.

    It worked perfectly.