Home  >  Article  >  Backend Development  >  Install paramiko module and pycrypto module in python under windows

Install paramiko module and pycrypto module in python under windows

不言
不言Original
2018-06-02 15:47:101686browse

This article mainly introduces you to the relevant information on installing the paramiko module and pycrypto module in Python under Windows through three simple steps. The installation steps in the article are simple and easy for everyone to understand. Friends who need it are as follows: Get up and study.

Preface

Using SSH in Python requires OpenSSH, and OpenSSH depends on the paramiko module, which in turn depends on the pycrypto module. So to use SSH in python, we need to install the pycrypto module first and then the paramiko module. Not much to say below, let’s take a look at the detailed introduction:

Installation method

1》First of all, make sure python Installed and environment variables set. (This article will not go into details about the installation of python.)

2》Install pycrypto:

You can download pycrypto from the official website and compile it, but this will be more troublesome. , it is also easy to have problems during the process

After the installation is completed, perform the following operations. If no error is reported, it means the installation is successful; Pay attention to the case when importing the module. If the first letter is written in lowercase, an error will occur! ! !

>>> import crypto #首字母写成小写,会出错 
Traceback (most recent call last): 
 File "<pyshell#0>", line 1, in <module> 
 import crypto 
ImportError: No module named crypto 
>>> import Crypto 
>>>

3》Install paramiko:

Execute under cmd: pip install paramiko

[To install using pip, you need to install pip in advance; this article will not go into details about the installation of pip. Friends in need can refer to this article: http://www.jb51.net/article/107473.htm】

After the installation is completed, execute the following. If no error is reported, it means the installation Success:

>>> import paramiko
>>>

The above is the detailed content of Install paramiko module and pycrypto module in python under windows. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn