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
403 views
in Technique[技术] by (71.8m points)

python - Install paramiko on Windows

OK. I read installing paramiko on Windows.

All mentioned methods simply do not work.

Authors have different environments with different components/libraries installed. Or may be they don't test their solutions before posting an answer :)

I removed all python versions and libs from my machine (Windows 8 x64) and tried to install python and paramiko from scratch.

Method number 1 (FAILED)

  1. Install python-2.7.3.amd64.msi
  2. Install pycrypto-2.6.win-amd64-py2.7.exe
  3. Download https://github.com/paramiko/paramiko/archive/master.zip, unpack it.
  4. Run setup.py install
  5. Go to IDLE, run import paramiko.

Result:

Traceback (most recent call last):   File "<pyshell#0>", line 1, in
<module>
  import paramiko   File "C:Python27libsite-packagesparamiko\__init__.py", line 65, in
<module>
    from transport import SecurityOptions, Transport   File "C:Python27libsite-packagesparamikoransport.py", line 45, in
<module>
   from paramiko.ecdsakey import ECDSAKey   File "C:Python27libsite-packagesparamikoecdsakey.py", line 24, in
<module>
  from ecdsa import SigningKey, VerifyingKey, der, curves ImportError: No module named ecdsa

Method number 2 (FAILED)

  1. Install python-2.7.3.amd64.msi
  2. Install setuptools-1.4.2.win-amd64-py2.7.exe
  3. Install pip-1.4.1.win-amd64-py2.7.exe
  4. pip install paramiko
  5. Go to IDLE, run import paramiko.

Result:

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import paramiko
  File "C:Python27libsite-packagesparamiko\__init__.py", line 64, in <module>
    from transport import SecurityOptions, Transport
  File "C:Python27libsite-packagesparamikoransport.py", line 33, in <module>
    from paramiko import util
  File "C:Python27libsite-packagesparamikoutil.py", line 33, in <module>
    from paramiko.common import *
  File "C:Python27libsite-packagesparamikocommon.py", line 98, in <module>
    from Crypto import Random
ImportError: No module named Crypto

Method number 3 (SUCCESS)

  1. Install python-2.7.3.amd64.msi
  2. Install pycrypto-2.6.win-amd64-py2.7.exe
  3. Install setuptools-1.4.2.win-amd64-py2.7.exe
  4. Install pip-1.4.1.win-amd64-py2.7.exe
  5. Run pip install ecdsa
  6. Download and extract https://github.com/paramiko/paramiko/archive/master.zip
  7. Run setup.py install
  8. Open IDLE, run import paramiko

Result: no errors

Please, help me to find step-by-step algorithm for installing python and paramiko on clean windows 8 machine. Thanx.

UPD: Solution has been found.

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

For installing paramiko, Visual Basic Compiler is needed.

First download it from Microcsoft: Microsoft Visual C++ Compiler for Python 2.7

Open the paramiko directory and run python setup.py install . And it will download dependencies from internet; especially pycrypto and installation will be successful.


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

...