Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python import paramiko error "cannot import name util"

I have installed the paramiko module. However, when I tried to import that module. I got the following error.

import paramiko
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-42-e77d47aa6e4a> in <module>()
----> 1 import paramiko

C:\Anaconda\lib\site-packages\paramiko\__init__.py in <module>()
     28 
     29 
---> 30 from paramiko.transport import SecurityOptions, Transport
     31 from paramiko.client import SSHClient, MissingHostKeyPolicy, AutoAddPolicy, RejectPolicy, WarningPolicy
     32 from paramiko.auth_handler import AuthHandler

C:\Anaconda\lib\site-packages\paramiko\transport.py in <module>()
     30 
     31 import paramiko
---> 32 from paramiko import util
     33 from paramiko.auth_handler import AuthHandler
     34 from paramiko.ssh_gss import GSSAuth

ImportError: cannot import name util

Does anyone know how to resolve this issue?

like image 403
Eaton Chow Avatar asked Mar 31 '15 20:03

Eaton Chow


1 Answers

Try with reinstalling it. In my case, it works.

pip uninstall paramiko
pip install paramiko --upgrade
like image 73
Bhavesh Odedra Avatar answered Oct 19 '22 01:10

Bhavesh Odedra