pip install m2crypto 因 swig 而失败
pip install m2crypto failing with swig
我想弄清楚为什么我的 m2crypto pip 安装失败了。我需要它以便安装另一个名为 pywbem 的 vmware 模块。
m2crypto 安装在执行 swig 命令时失败。
我检查了一下,我是 运行 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/
看起来您至少需要 SWIG 版本 2.0.4,因为安装因 -builtin
选项而终止。
我刚刚执行了 yum install pywbem 并且安装正常
我想弄清楚为什么我的 m2crypto pip 安装失败了。我需要它以便安装另一个名为 pywbem 的 vmware 模块。
m2crypto 安装在执行 swig 命令时失败。
我检查了一下,我是 运行 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/
看起来您至少需要 SWIG 版本 2.0.4,因为安装因 -builtin
选项而终止。
我刚刚执行了 yum install pywbem 并且安装正常