Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Paramiko: Module object has no attribute error 'SSHClient'

What I found was that if you name your file "paramiko.py" you get this error, but I named my file something else and I still get the same error. I really have no idea what I did wrong, I'm fairly confident I installed PyCrypto and Paramiko successfully.

import paramiko
ssh = paramiko.SSHClient()
ssh.connect('127.0.0.1', username='meelo_rw', password='')

Running this on Windows 8.1.

like image 844
dzzl Avatar asked Aug 20 '14 16:08

dzzl


1 Answers

Just to close off the question... if you have a module named paramiko.py that tries to import paramiko, you run the risk that it will try to import itself instead of the real paramiko module. You can rename your module to fix the problem, but be sure to remove the .pyc file also. Python will continue to import the "compiled" .pyc file in preference to the real module.

like image 177
tdelaney Avatar answered Nov 06 '22 06:11

tdelaney