轉自作者:大道至簡_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