点击安装m2crypto失败与swig

时间:2016-04-22 18:56:26

标签: python pip swig

我想弄清楚为什么m2pypto的pip安装失败了。我需要它,以便我可以安装另一个名为pywbem的vmware模块。

m2crypto安装在swig命令失败。

我检查过,我正在运行一个版本:1.3.40

有人可以帮帮我吗?

/usr/lib64/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6
DeprecationWarning
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting m2crypto
Using cached M2Crypto-0.24.0.tar.gz
Requirement already satisfied (use --upgrade to upgrade): unittest2 in /usr/lib/python2.6/site-packages (from m2crypto)
Requirement already satisfied (use --upgrade to upgrade): argparse in /usr/lib/python2.6/site-packages (from unittest2->m2crypto)
Requirement already satisfied (use --upgrade to upgrade): traceback2 in /usr/lib/python2.6/site-packages (from unittest2->m2crypto)
Requirement already satisfied (use --upgrade to upgrade): six>=1.4 in /usr/lib/python2.6/site-packages/six-1.10.0-py2.6.egg (from unittest2->m2crypto)
Requirement already satisfied (use --upgrade to upgrade): linecache2 in /usr/lib/python2.6/site-packages (from traceback2->unittest2->m2crypto)
Installing collected packages: m2crypto
Running setup.py install for m2crypto ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-IdcQbu/m2crypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-qkp3B9-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
copying M2Crypto/DH.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/httpslib.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/Engine.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/Err.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/EVP.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/m2urllib2.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/util.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/RSA.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/SMIME.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/threading.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/BN.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/X509.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/ftpslib.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/AuthCookie.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/BIO.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/ASN1.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/RC4.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/m2xmlrpclib.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/callback.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/EC.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/__init__.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/m2urllib.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/m2.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/DSA.py -> build/lib.linux-x86_64-2.6/M2Crypto
copying M2Crypto/Rand.py -> build/lib.linux-x86_64-2.6/M2Crypto
creating build/lib.linux-x86_64-2.6/M2Crypto/SSL
copying M2Crypto/SSL/cb.py -> build/lib.linux-x86_64-2.6/M2Crypto/SSL
copying M2Crypto/SSL/Checker.py -> build/lib.linux-x86_64-2.6/M2Crypto/SSL
copying M2Crypto/SSL/SSLServer.py -> build/lib.linux-x86_64-2.6/M2Crypto/SSL
copying M2Crypto/SSL/Cipher.py -> build/lib.linux-x86_64-2.6/M2Crypto/SSL
copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.linux-x86_64-2.6/M2Crypto/SSL
copying M2Crypto/SSL/timeout.py -> build/lib.linux-x86_64-2.6/M2Crypto/SSL
copying M2Crypto/SSL/Context.py -> build/lib.linux-x86_64-2.6/M2Crypto/SSL
copying M2Crypto/SSL/Connection.py -> build/lib.linux-x86_64-2.6/M2Crypto/SSL
copying M2Crypto/SSL/__init__.py -> build/lib.linux-x86_64-2.6/M2Crypto/SSL
copying M2Crypto/SSL/TwistedProtocolWrapper.py -> build/lib.linux-x86_64-2.6/M2Crypto/SSL
copying M2Crypto/SSL/Session.py -> build/lib.linux-x86_64-2.6/M2Crypto/SSL
creating build/lib.linux-x86_64-2.6/M2Crypto/PGP
copying M2Crypto/PGP/RSA.py -> build/lib.linux-x86_64-2.6/M2Crypto/PGP
copying M2Crypto/PGP/packet.py -> build/lib.linux-x86_64-2.6/M2Crypto/PGP
copying M2Crypto/PGP/PublicKey.py -> build/lib.linux-x86_64-2.6/M2Crypto/PGP
copying M2Crypto/PGP/__init__.py -> build/lib.linux-x86_64-2.6/M2Crypto/PGP
copying M2Crypto/PGP/constants.py -> build/lib.linux-x86_64-2.6/M2Crypto/PGP
copying M2Crypto/PGP/PublicKeyRing.py -> build/lib.linux-x86_64-2.6/M2Crypto/PGP
running build_ext
building 'M2Crypto.__m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -D__x86_64__ -I/usr/include/python2.6 -I/usr/include -I/usr/include/openssl -includeall -modern -builtin -outdir build/lib.linux-x86_64-2.6/M2Crypto -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 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-IdcQbu/m2crypto/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-qkp3B9-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-IdcQbu/m2crypto/

2 个答案:

答案 0 :(得分:0)

看起来您至少需要SWIG版本2.0.4,因为安装因-builtin选项而死亡。

来自文档:http://www.swig.org/Doc2.0/Python.html#Python_nn28

答案 1 :(得分:0)

我刚刚安装了yum install pywbem并且安装得很好