ImportError:无法导入名称_counter但_counter.pyd存在

时间:2016-06-09 19:50:44

标签: python-2.7 paramiko pycrypto

我在运行import paramiko时遇到了下面的堆栈跟踪(这是在windows平台上)

  File "/usr/lib/python2.7/site-packages/paramiko/__init__.py", line 30, in <module>
    from paramiko.transport import SecurityOptions, Transport
  File "/usr/lib/python2.7/site-packages/paramiko/transport.py", line 50, in <module>
    from paramiko.dsskey import DSSKey
  File "/usr/lib/python2.7/site-packages/paramiko/dsskey.py", line 26, in <module>
    from Crypto.PublicKey import DSA
  File "/usr/lib/python2.7/site-packages/Crypto/PublicKey/DSA.py", line 89, in <module>
    from Crypto import Random
  File "/usr/lib/python2.7/site-packages/Crypto/Random/__init__.py", line 29, in <module>
    from Crypto.Random import _UserFriendlyRNG
  File "/usr/lib/python2.7/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 38, in <module>
    from Crypto.Random.Fortuna import FortunaAccumulator
  File "/usr/lib/python2.7/site-packages/Crypto/Random/Fortuna/FortunaAccumulator.py", line 39, in <module>
    import FortunaGenerator
  File "/usr/lib/python2.7/site-packages/Crypto/Random/Fortuna/FortunaGenerator.py", line 35, in <module>
    from Crypto.Util import Counter
  File "/usr/lib/python2.7/site-packages/Crypto/Util/Counter.py", line 59, in <module>
    from Crypto.Util import _counter
ImportError: cannot import name _counter

我看到_counter.pyd存在于Pycrypto文件夹中。为什么这不被选中?

0 个答案:

没有答案