tutorial on installing Python's SSH module under Windows system

Source: Internet
Author: User

The use of SSH in Python requires openssh, and OpenSSH relies on the Paramiko module, and the Paramiko module relies on the Pycrypto module, so to use SSH in Python, you need to first install the module order: Pycrypto- > ECDSA, Paramiko

1, installation Pycrypto

Installing this is cumbersome and requires local compilation, and there is a lot of configuration for VS or GCC, and it's not necessarily possible to compile successfully. (Can search the installation steps on the Internet)
Error Description:  

when installing from source code Python module encountered this error. But I clearly downloaded and installed the Microsoft Visual C + + Compiler package for Python 2.7 from the official website and configured the environment variable path.

cause of error:
The reason for this error is that the msvc9compiler.py in the Python distutils module does not look for ' vcvarsall.bat ' in the path specified by the environment variable, but rather through the registry to find ..., however, it is not known why the compiler installation process did not configure the registry.

Workaround:
As long as the registry is configured manually, it is OK.
1. Open Registry Editor
Run regedit
2. Configuration
2.1. If the python you are installing is 32-bit, create the followingItems
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Setup\VC
2.2. If the python you are installing is 64-bit, create the followingItems
HKEY_CURRENT_USER\Software\Wow6432Node\Microsoft\VisualStudio\9.0\Setup\VC
3, and new under this itemString Value
Name:productdir
Data: Vcvarsall.bat Path
Note: The path does not contain the last backslash.

2, Installation ECDSA

See a lot of blogs do not mention this library, but I do Paramiko, I am not prompted to find the ECDSA module.
Download: https://pypi.python.org/pypi/ecdsa/0.9 , unzip to a directory, and there is a setup.py in the directory.
Installation is relatively simple, Windows directly under the extracted directory after the execution: Python setup.py install

3. Installing Paramiko

With the ECDSA type installed, just open the download page very slow ...

Installation Steps with ECDSA

tutorial on installing Python's SSH module under Windows system

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.