python使用pip安装m2crypto出现了报错

Collecting m2crypto
Using cached M2Crypto-0.22.5.tar.gz
Installing collected packages: m2crypto
Running setup.py install for m2crypto
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-QPBaeS/m2crypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-xTg6CK-record/install-record.txt --single-version-externally-managed --compile:

cto

c
copying M2Crypto/PGP/PublicKeyRing.py -> build/lib.linux-x86_64-2.7/M2Crypto/PGP
running build_ext
building 'M2Crypto.__m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -I/usr/local/python27/include/python2.7 -I/usr/include -includeall -modern -builtin -outdir build/lib.linux-x86_64-2.7/M2Crypto -D__x86_64__ -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
swig error : Unrecognized option -builtin
Use 'swig -help' for available options.
error: command 'swig' failed with exit status 1

----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-QPBaeS/m2crypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-xTg6CK-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-QPBaeS/m2crypto
linux环境下的安装,直接使用pip 安装的。系统时centos6.7

windows 的可以试试https://github.com/saltstack/salt-windows-install/blob/master/deps/win32-py2.7/M2Crypto-0.21.1.win32-py2.7.msi

    Python是一种面向对象、直译式计算机程序设计语言,它常被昵称为胶水语言,它能够很轻松的把用其他语言制作的各种模块(尤其是C/C++)轻松地联结在一起。

    Python是纯粹的自由软件, 源代码和解释器CPython遵循 GPL协议。语法简洁清晰,特色之一是强制用空白符作为语句缩进。

    名字来源于一个喜剧,最初设计Python这种语言的人并没有想到Python会在工业和科研上获得如此广泛的使用。

温馨提示:内容为网友见解,仅供参考
第1个回答  2017-09-07

python使用pip安装m2crypto出现了报错

https //www douban com/note/504845291/

第2个回答  2015-12-03
windows 的可以试试
https://github.com/saltstack/salt-windows-install/blob/master/deps/win32-py2.7/M2Crypto-0.21.1.win32-py2.7.msi追问

不是win的,是linux的

追答

Linux上没怎么用,不过个人感觉linux上应该更方便。google找找。good luck!

追问

找了蛮久,英文不好,google看不太懂。不过谢谢了

本回答被网友采纳
第3个回答  2017-08-09
试试加sudo或者su加权限执行一下
第4个回答  2017-08-08
pip install --egg M2CryptoWin64
相似回答