转自作者:大道至简_Andy
原文链接:https://www.jianshu.com/p/b308357ef649
第一种方式:使用apt-get(以Python2版本进行测试的)
-
sudo apt-get install python-m2crypto
, M2Crypto将安装到系统Python库中。
第二种方式:从源码进行安装((兼容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
第三种方式:pip安装(不兼容Python3)
-
pip install M2Crypto
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