Skip to content

Instantly share code, notes, and snippets.

@shhider
Created January 18, 2018 06:32
Show Gist options
  • Save shhider/d322b7cfd5104c45b44e1fba518ff668 to your computer and use it in GitHub Desktop.
Save shhider/d322b7cfd5104c45b44e1fba518ff668 to your computer and use it in GitHub Desktop.
处理 pip 安装 m2crypto 报错的方法集合

安装 m2crypto 出现报错,通常是 swig 的原因,所以:

1、更新 swig

wget http://prdownloads.sourceforge.net/swig/swig-3.0.12.tar.gz
tar zxf swig-3.0.12.tar.gz
cd swig-3.0.12
./configure --prefix=/usr
make && make install

2、手动安装 m2crypto

到其主页下载源码,https://pypi.python.org/pypi/M2Crypto

解压、进入目录,通过 python setup.py install 安装。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment