开发者

ImportError: No module named paramiko

开发者 https://www.devze.com 2023-04-08 06:23 出处:网络
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 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 $ rp开发者_如何转开发m -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')


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消