First approach: Using Apt-get (tested with Python2 version)
sudo apt-get install python-m2crypto
, the M2crypto will be installed in the System Python library.
Second way: Install from source ((compatible with python2,3))
sudo apt-get install build-essential python3-dev python-dev libssl-dev swig
pip install https://gitlab.com/m2crypto/m2crypto/repository/python3/archive.tar.gz
Third Way: Pip installation (incompatible Python3)
pip install M2Crypto
The above installation methods are tested in Python versions of the following systems: Debian 7.11, 8.8, 9.2
Python 2.7.11, 2.7.13, 2.7.14, 3.5.4, 3.6.3
Ubuntu 16.04.3 LTS
Python 2.7.3, 2.7.9, 2.7.11, 2.7.13, 2.7.14, 3.5.4, 3.6.3
Boulevard to Jane _andy
Links: https://www.jianshu.com/p/b308357ef649
Source: Pinterest
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.
Python3 M2crypto Installation (RSA private key file encryption)