在ubuntu上安装paramik / Crypto

时间:2013-06-19 19:57:36

标签: python

我已经从github here下载并安装了paramik;但无法管理它。

Traceback (most recent call last):
  File "test.py", line 30, in <module>
    import paramiko
  File "/home/superiois/Downloads/paramiko-master/paramiko/__init__.py", line 62, in <module>
    from transport import SecurityOptions, Transport
  File "/home/superiois/Downloads/paramiko-master/paramiko/transport.py", line 33, in <module>
    from paramiko import util
  File "/home/superiois/Downloads/paramiko-master/paramiko/util.py", line 33, in <module>
    from paramiko.common import *
  File "/home/superiois/Downloads/paramiko-master/paramiko/common.py", line 98, in <module>
    from Crypto import Random
ImportError: cannot import name Random

我相信我的加密是最新的;简单地说,我不能让这个命令“从加密导入随机”工作。我很感激任何提示

1 个答案:

答案 0 :(得分:1)

当我尝试它(OS X)时它起作用了:

$ pip install git+git://github.com/paramiko/paramiko.git
$ python
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import paramiko
>>> from Crypto import Random
>>>

我注意到它需要PyCrypto != 2.4;是否可能是您安装的版本?你是怎么安装paramiko / PyCrypto的?