Python paramiko windows install

InstallingВ¶

These instructions cover Paramiko 2.0 and above. If you’re looking to install Paramiko 1.x, see Installing (1.x) . However, the 1.x line relies on insecure dependencies so upgrading is strongly encouraged.

Paramiko itselfВ¶

The recommended way to get Paramiko is to install the latest stable release via pip:

We currently support Python 2.7, 3.4+, and PyPy. Users on Python 2.6 or older (or 3.3 or older) are urged to upgrade.

Paramiko has only a few direct dependencies:

  • The big one, with its own sub-dependencies, is Cryptography; see its specific note below for more details;
  • bcrypt, for Ed25519 key support;
  • pynacl, also for Ed25519 key support.

There are also a number of optional dependencies you may install using setuptools ‘extras’:

If you want all optional dependencies at once, use paramiko[all] .

For Match exec config support, use paramiko[invoke] (which installs Invoke).

For GSS-API / SSPI support, use paramiko[gssapi] , though also see the below subsection on it for details.

paramiko[ed25519] references the dependencies for Ed25519 key support.

  • As of Paramiko 2.x this doesn’t technically do anything, as those dependencies are core installation requirements.
  • However, you should use this for forwards compatibility; 3.0 will drop those dependencies from core, leaving them purely optional.

Release linesВ¶

Users desiring stability may wish to pin themselves to a specific release line once they first start using Paramiko; to assist in this, we guarantee bugfixes for the last 2-3 releases including the latest stable one.

This typically spans major & minor versions, so even if e.g. 3.1 is the latest stable release, it’s likely that bugfixes will occasionally come out for the latest 2.x and perhaps even 1.x releases, as well as for 3.0. New feature releases for previous major-version lines are less likely but not unheard of.

If you’re unsure which version to install:

  • Completely new users should always default to the latest stable release (as above, whatever is newest / whatever shows up with pip install paramiko .)
  • Users upgrading from a much older version (e.g. 1.7.x through 1.10.x) should probably get the oldest actively supported line (check the Changelog for recent releases).
  • Everybody else is hopefully already “on” a given version and can carefully upgrade to whichever version they care to, when their release line stops being supported.
Читайте также:  Загрузочная флешка несколько образов linux

CryptographyВ¶

Cryptography provides the low-level (C-based) encryption algorithms we need to implement the SSH protocol. It has detailed installation instructions (and an FAQ) which you should read carefully.

In general, you’ll need one of the following setups:

On Windows or Mac OS X, provided your pip is modern (8.x+): nothing else is required. pip will install statically compiled binary archives of Cryptography & its dependencies.

On Linux, or on other platforms with older versions of pip : you’ll need a C build toolchain, plus development headers for Python, OpenSSL and libffi . Again, see Cryptography’s install docs; these requirements may occasionally change.

If you go this route, note that OpenSSL 1.0.1 or newer is effectively required. Cryptography 1.3 and older technically allow OpenSSL 0.9.8, but 1.4 and newer — which Paramiko will gladly install or upgrade, if you e.g. pip install -U — drop that support.

Optional dependencies for GSS-API / SSPI / KerberosВ¶

In order to use GSS-API/Kerberos & related functionality, additional dependencies are required. It hopefully goes without saying but all platforms need a working installation of GSS-API itself, e.g. Heimdal.

If you use Microsoft SSPI for kerberos authentication and credential delegation, make sure that the target host is trusted for delegation in the active directory configuration. For details see: http://technet.microsoft.com/en-us/library/cc738491%28v=ws.10%29.aspx

The gssapi “extra” install flavor¶

If you’re installing via pip (recommended), you should be able to get the optional Python package requirements by changing your installation to refer to paramiko[gssapi] (from simply paramiko ), e.g.:

(Or update your requirements.txt , or etc.)

Manual dependency installationВ¶

If you’re not using pip or your pip is too old to support the “extras” functionality, the optional dependencies are as follows:

All platforms need pyasn1 0.1.7 or later.

Unix needs: gssapi 1.4.1 or better.

  • An alternative is the python-gssapi library ( 0.6.1 or above), though it is no longer maintained upstream, and Paramiko’s support for its API may eventually become deprecated.

Windows needs pywin32 2.1.8 or better.

Paramiko

A Python implementation of SSHv2.

Professionally-supported Paramiko is available with the Tidelift Subscription.

Установить парамико на Windows

Все перечисленные методы просто не работают.

Авторы имеют разные среды с разными компонентами / библиотеками. Или, может быть, они не проверяют свои решения, прежде чем отправлять ответ:)

Я удалил все версии и библиотеки Python со своей машины (Windows 8 x64) и попытался установить Python и Paramiko с нуля.

Способ № 1 (СБОЙ)

  1. Установите python-2.7.3.amd64.msi
  2. Установите pycrypto-2.6.win-amd64-py2.7.exe
  3. Загрузите https://github.com/paramiko/paramiko/archive/master.zip, распакуйте его.
  4. Запустите setup.py install
  5. Зайдите в IDLE, запустите импорт paramiko.

Способ № 2 (СБОЙ)

  1. Установите python-2.7.3.amd64.msi
  2. Установите setuptools-1.4.2.win-amd64-py2.7.exe
  3. Установите pip-1.4.1.win-amd64-py2.7.exe
  4. pip install paramiko
  5. Зайдите в IDLE, запустите импорт paramiko.
Читайте также:  Как установить windows с дика

Метод № 3 (УСПЕХ)

  1. Установите python-2.7.3.amd64.msi
  2. Установите pycrypto-2.6.win-amd64-py2.7.exe
  3. Установите setuptools-1.4.2.win-amd64-py2.7.exe
  4. Установите pip-1.4.1.win-amd64-py2.7.exe
  5. Запустите pip install ecdsa
  6. Загрузите и извлеките https://github.com/paramiko/paramiko/archive/master.zip
  7. Запустите setup.py install
  8. Откройте IDLE, запустите импорт paramiko

Результат: нет ошибок

Пожалуйста, помогите мне найти пошаговый алгоритм установки Python и Paramiko на чистой машине Windows 8. Thanx.

UPD: решение найдено.

5 ответов

Для установки paramiko необходим компилятор Visual Basic.

Откройте каталог paramiko и запустите python setup.py install . И это будет загружать зависимости из Интернета; особенно pycrypto и установка будет успешной.

Вы скучаете по pycrypto зависимость. pip это самый простой способ:

Кроме того, вы можете установить из источника, с помощью:

Для пользователей Windows:

  1. Установите Python 2.7.11
  2. Загрузите и установите pycrypto win-amd64-py2.7.exe

Теперь откройте командную строку. Если вы установили Python в следующем месте:

c: \ Python27, затем измените каталог и перейдите в каталог Scripts.

Теперь введите следующую команду:

pip install paramiko

Вот и все, вы успешно установили Paramiko.

Для первой последовательности вам нужно установить ‘ecdsa’ с pip, потому что компиляция paramiko не разрешает автоматически ее зависимости (как ваше рабочее решение)

Второй сбой, как уже говорилось, потому что вы не установили pycrypto перед запуском pip install paramiko , Я бы порекомендовал использовать эту опцию вместо установки из исходного кода, чтобы облегчить путь обновления с помощью pip. Также pip проще всего установить с помощью отдельного сценария установки: http://pip.readthedocs.org/en/latest/installing.html

Также я столкнулся со следующими ошибками:

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

build \ temp.win32-2.7 \ Release_openssl.c (423): фатальная ошибка C1083: Невозможно открыть включаемый файл: ‘openssl/opensslv.h’: такого файла или каталога нет

ошибка: команда «C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe» завершилась неудачно с состоянием выхода 2

пропустил этот файл: ‘openssl/opensslv.h’

это произойдет потому, что при установке пакетов paramiko / cryptography / pyOpenSSL им всем требовался дистрибутив OpenSSL-Win32 с *.lib и файлами заголовков, такими как: openssl \ opensslv.h

Итак, после установки соответствующего OpenSSL приложения. версия, взята отсюда: http://code.x2go.org/releases/binary-win32/3rd-party/Win32OpenSSL/

и скопировал все заголовки из C: \ OpenSSL-Win32 \ include \ openssl *. * в C: \ Pyhton27 \ inclide *. *

и скопировал все библиотеки из C: \ OpenSSL-win32 \ lib в C: \ Python27 \ Lib *. *

Пакет paramiko был успешно установлен.! Надеюсь это кому-нибудь пригодится.:) удачи:)

ITalchemy – Pick my brain

Python, Cisco, Linux, VMware, Microsoft and IT Labs

Python: Installing netmiko (paramiko) on Windows 10 PC for automation

In order to write a script and automate your infra devices via ssh/telnet, python uses paramiko. In Linux/MAC OS environment, it is easy to install or this module is already included as a package. For windows, the module installation process is more cumbersome. I have come across a few articles on Google attempting to do this but the examples found were clear as mud. Here is a precise steps for the installation and also some troubleshooting URLs referenced for your convenience. 🙂

3. From the Anaconda Prompt (Shell), run “conda install paramiko”.

4. From the Anaconda Prompt (Shell), run “pip install scp”.

6. From Git Bash window. Clone netmiko with “git clone https://github.com/ktbyers/netmiko”

7.From Git Bash window. Unable to install Netmiko in windows after it cloned. define the path for python.

bchoi@AUD-4D1KYF2 MINGW32 /h/netmiko (develop)

8. cd into the netmiko directory and run “python setup.py install”.

bchoi@AUD-4D1KYF2 MINGW32 /h/netmiko (develop)

$ python setup.py install

End result: You can now use parmiko on your windows PC!

Tip1: To display Windows 10 Roaming folder

Unable to install Netmiko in windows after it cloned:

Python paramiko windows install

The high-level python API starts with the creation of a secure connection object. To have more direct control and pass a socket to transport to start remote access. As a client, it’s authenticating using a user credential or private key, and checking the server’s host key.

Paramiko is a Python library that makes a connection with a remote device through SSh. Paramiko is using SSH2 as a replacement of SSL to make a secure connection between two devices. It also supports the SFTP client and server model.

Installation

On Windows

To install Paramiko on Windows using pip run bellow command on cmd.

Output:

To check the installed paramiko run the following:

Output:

Install paramiko using .whl file ofline. To download .whl file https://pypi.org/project/paramiko/#files

Output :

On Linux

Python paramiko can be installed on Linux in many ways, using pip is one of them.

Output :

To check the installed paramiko:

Output:

Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.

Install 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.

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.

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.

Читайте также:  Java program windows cmd
Оцените статью