Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
169 views
in Technique[技术] by (71.8m points)

python - installing paramiko on Windows

This may sound like a repeated question on SF, but I could not find a clear answer to it, yet.So. I installed Paramiko 1.7 with "setup.py install" command and while running the demo.py program, I got this error:

 Traceback (most recent call last):
  File "C:Documents and SettingsfixavierDesktopparamiko-1.7demosdemo.py", line 33, in <module>
    import paramiko
  File "C:Python26libsite-packagesparamiko\__init__.py", line 69, in <module>
    from transport import randpool, SecurityOptions, Transport
  File "C:Python26libsite-packagesparamikoransport.py", line 32, in <module>
    from paramiko import util
  File "C:Python26libsite-packagesparamikoutil.py", line 31, in <module>
    from paramiko.common import *
  File "C:Python26libsite-packagesparamikocommon.py", line 99, in <module>
    from Crypto.Util.randpool import PersistentRandomPool, RandomPool
ImportError: No module named Crypto.Util.randpool

I'm getting this error even after installing PyCrypto 2.1. On running test.py(which comes with the installation), I got the following error -

    Traceback (most recent call last):
  File "C:Documents and SettingsfixavierDesktoppycrypto-2.0.1pycrypto-2.0.1est.py", line 18, in <module>
    from Crypto.Util import test
  File "C:Documents and SettingsfixavierDesktoppycrypto-2.0.1pycrypto-2.0.1uild/lib.win32-2.6CryptoUtilest.py", line 17, in <module>
    import testdata
  File "C:Documents and SettingsfixavierDesktoppycrypto-2.0.1pycrypto-2.0.1estestdata.py", line 450, in <module>
    from Crypto.Cipher import AES
ImportError: cannot import name AES

I don't have the confidence to go ahead and install AES after all this, for all I know I may get another ImportError! Please advice.Is it the way of installation thats problematic?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Looks like your pycrypto installation is broken or not installed.

Try to get a pycrypto for python2.6 installer here and try again after installing it.

http://www.voidspace.org.uk/python/modules.shtml#pycrypto


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...