已解决:python2.7 ubuntu1204 import paramiko,ImportError

ubuntu1204 import paramiko遇到:ImportError,输出如下:


 

Python 2.7.3 (default, Oct 26 2016, 21:04:23) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/paramiko/__init__.py", line 22, in <module>
    from paramiko.transport import SecurityOptions, Transport
  File "/usr/local/lib/python2.7/dist-packages/paramiko/transport.py", line 89, in <module>
    from paramiko.dsskey import DSSKey
  File "/usr/local/lib/python2.7/dist-packages/paramiko/dsskey.py", line 27, in <module>
    from cryptography.hazmat.primitives.asymmetric.utils import (
  File "/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/primitives/asymmetric/utils.py", line 7, in <module>
    from asn1crypto.algos import DSASignature
ImportError: No module named asn1crypto.algos

之后操作:

apt-get autoremove python-paramiko 

rm -r /usr/local/lib/python2.7/dist-packages/paramiko

apt-get install python-paramiko 

后解决

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值