[Tutor] Import Error.

Peter Otten __peter__ at web.de
Sun Jul 23 12:56:59 EDT 2017


Deepen Patel wrote:

> Hi,
> 
> I got error like Import error.
> 
> Traceback (most recent call last):
>   File "startnode.py", line 8, in <module>
>     from twisted.conch import manhole, manhole_ssh
>   File
> "/usr/local/lib/python2.7/dist-packages/twisted/conch/manhole_ssh.py",
> line 14, in <module>
>     from twisted.conch.ssh import factory, session
>   File
> "/usr/local/lib/python2.7/dist-packages/twisted/conch/ssh/factory.py",
> line 18, in <module>
>     from twisted.conch.ssh import (_kex, transport, userauth, connection)
>   File
> "/usr/local/lib/python2.7/dist-packages/twisted/conch/ssh/transport.py",
> line 22, in <module>
>     from cryptography.exceptions import UnsupportedAlgorithm
> ImportError: No module named cryptography.exceptions
> 
> Currently, I am using virtual environments and in virtual environment this
> code not run properly.
> previously, I am running code without virtual environments. it works
> proper.
> 
> Await your reply.
> 
> Regards,
> Deepen Patel.

If I understand

https://github.com/twisted/twisted/blob/trunk/INSTALL.rst

and

http://twistedmatrix.com/documents/current/installation/howto/optional.html

correctly you have to install with

$ pip install twisted[conch]



More information about the Tutor mailing list