step1: First, download the file shown in the following figure to the local :
Put this whl After the file is downloaded successfully , Place in directory :D:\python\python3.6.2\Scripts Next 【 This is my local python The installation directory , In the process of actual operation , Replace with your own local python The installation directory of 】
step2:
cmd Command to enter :D:\python\python3.6.2\Scripts Under the table of contents
Enter the command :pip install pycrypto-2.6.1-cp36-cp36m-win_amd64.whl
If appear :Successfully installed pycrypto-2.6.1 Description installation successful
step3:
take site-packages Under bag crypto It is amended as follows :Crypto
step4:
If it runs incorrectly :ModuleNotFoundError: No module named ‘winrandom’
In the catalog :D:\python\python3.6.2\Lib\site-packages\Crypto\Random\OSRNG modify nt.py file , take import winrandom It is amended as follows :from . import winrandom that will do
During the test , It may be necessary to linux and windows Environment crypto Module installation , The environment is different ,linux And windows The environment installation steps will also vary , The second point of knowledge is specialized in crypto Combination of modules python Use in linux And windows Explanation of the differences between environmental installation methods
One 、Linux In the environment :
from Crypto.Signature import PKCS1_v1_5
If there is an error in the guide package :
ImportError: No module named 'Crypto.Signature'
ImportError: No module named 'Crypto'
resolvent :
step1、pip install crypto
step2、 After successful installation , take crypto Change the name to :Crypto
step3、 pip3 install pycryptodome
Fast way :pip3 install -i https://pypi.douban.com/simple pycryptodome
PyCrypto Is dead , Please replace with PyCryptodome
pip3 install modular –upgrade –target=” Specified directory ”
The third step is to linux perform :
pip3 install pycryptodome perhaps
Fast way :pip3 install -i https://pypi.douban.com/simple pycryptodome
step4、 stay linux In the environment , Input python3
>>>from Crypto.Signature import PKCS1_v1_5
If no error is reported , Description installation takes effect , The error reported by this guide package has been solved
Two 、Windows In the environment :
step1:
Put this whl After the file is downloaded successfully , Place in directory :D:\python\python3.6.2\Scripts Next
step2:
cmd Command to enter :D:\python\python3.6.2\Scripts Under the table of contents
Enter the command :pip install pycrypto-2.6.1-cp36-cp36m-win_amd64.whl
If appear :Successfully installed pycrypto-2.6.1 Description installation successful
step3:
take site-packages Under bag crypto It is amended as follows :Crypto
step4:
If it runs incorrectly :ModuleNotFoundError: No module named ‘winrandom’
In the catalog :D:\python\python3.6.2\Lib\site-packages\Crypto\Random\OSRNG modify nt.py file , take import winrandom It is amended as follows :from . import winrandom that will do
Welcome to your attention 【 The way of immeasurable testing 】 official account , reply 【 Claim resources 】
Python+Unittest frame API automation 、
Python+Unittest frame API automation 、
Python+Pytest frame API automation 、
Python+Pandas+Pyecharts Big data analysis 、
Python+Selenium frame Web Of UI automation 、
Python+Appium frame APP Of UI automation 、
Python Programming learning resources dry goods 、
Vue Front end component framework development 、
Resources and code Free ~
Below the official account is two-dimensional code. , You can directly scan wechat and pay attention .
remarks : My official account has been officially opened. , betake IT Sharing of Internet technology .
contain : Data analysis 、 big data 、 machine learning 、 Test Development 、API Interface automation 、 Test operation and maintenance 、UI automation 、 Performance testing 、 code detection 、 Programming technology, etc .
WeChat search official account :“ The way of immeasurable testing ”, Or scan the qr code below :
Add the attention , Let's grow together !
Catalog Python Script editing
WeChat official account : Chua