Reputation: 105
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.
Upvotes: 7
Views: 24843
Reputation: 1
If you have nay file in your local system by the name of "paramiko". The code is going to import that paramiko instead of the python paramiko. You need to rename the file simply and the error will be gone.
Upvotes: 0
Reputation: 77347
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.
Upvotes: 18