Install paramiko on Windows

OK I read paramiko installation on windows .

All of the mentioned methods just do not work.

Authors have different environments with various components / libraries installed. Or maybe they don’t test their decisions before posting an answer :)

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

Method Number 1 (FAILED)

Result:

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

Method Number 2 (FAILED)

  • Install python-2.7.3.amd64.msi
  • Install setuptools-1.4.2.win-amd64-py2.7.exe
  • Install pip-1.4.1.win-amd64-py2.7.exe
  • pip install paramiko
  • Go to IDLE, run import paramiko.

Result:

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

Method Number 3 (SUCCESS)

  • Install python-2.7.3.amd64.msi
  • Install pycrypto-2.6.win-amd64-py2.7.exe
  • Install setuptools-1.4.2.win-amd64-py2.7.exe
  • Install pip-1.4.1.win-amd64-py2.7.exe
  • Run pip install ecdsa
  • Download and extract https://github.com/paramiko/paramiko/archive/master.zip
  • Run setup.py install
  • Open IDLE, start importing paramiko

Result: no errors

Please help me find a step-by-step algorithm for installing python and paramiko on a clean Windows 8. Thanx machine.

UPD: solution found.

+8
python pip easy-install paramiko pycrypto
source share
5 answers

Installing paramiko requires a Visual Basic compiler.

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

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

+4
source share

You are missing a pycrypto dependency. pip is the easiest way:

 pip install pycrypto pip install paramiko 

Alternatively, you can install from the source using:

 easy_install ./ 

(See: https://github.com/paramiko/paramiko )

+3
source share

For Windows users:

  • Install Python 2.7.11
  • Download and install pycrypto win-amd64-py2.7.exe
  • Now open a command prompt. If you installed python in the following location:

    c: \ Python27 then change the directory and change to the Scripts directory.

  • Now enter the following command:

    pip install paramiko

enter image description here

To him, you have successfully installed Paramiko.

+2
source share
  • For the first sequence, you need to install "ecdsa" with pip, because compiling paramiko does not automatically resolve its dependencies (as your working solution)

  • The second failed, as already mentioned, because you did not install pycrypto before running pip install paramiko . I would recommend using this option instead of installing from the source, in order to simplify the upgrade path with pip. In addition, the easiest package to install can be installed using a stand-alone installation script: http://pip.readthedocs.org/en/latest/installing.html

0
source share

In addition, I encountered the following errors, for example:

C: \ Program Files (x86) \ Microsoft Visual Studio 9.0 \ VC \ BIN \ cl.exe / c / nologo / Ox / MD / W3 / GS- / DNDEBUG -IC: \ Python27-x86 \ include -IC: \ Python27 -x86 \ PC / Tcbuild \ temp.win32-2.7 \ Release_openssl.c / Fobuild \ temp.win32-2.7 \ Release \ build \ temp.win32-2.7 \ Release_openssl.obj

_openssl.c

build \ temp.win32-2.7 \ Release_openssl.c (423): fatal error C1083: cannot open include file: 'openssl / opensslv.h' : no such file or directory

error: command 'C: \ Program Files (x86) \ Microsoft Visual Studio 9.0 \ VC \ BIN \ cl.exe' failed with exit status 2

skipped this file: 'openssl / opensslv.h'

this will happen because when you install the paramiko / crryptography / pyOpenSSL packages, everyone needs the OpenSSL-Win32 distribution with *. lib and file headers, for example: OpenSSL \ opensslv.h

therefore, after installing the appropriate OpenSSL application. version, taken from here: http://code.x2go.org/releases/binary-win32/3rd-party/Win32OpenSSL/

and copied all the headers from C: \ OpenSSL-Win32 \ include \ openssl *. * in C: \ Pyhton27 \ inclide *. *

and copied all the libraries from C: \ OpenSSL-win32 \ lib to C: \ Python27 \ Lib *. *

The paramiko package has been successfully installed.! Hope this will be helpful to someone. :) good luck :)

0
source share

All Articles