cmdmnt / commandment

Open Source Apple MDM implemented in Python
MIT License
295 stars 61 forks source link

Error install #7

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello jesse It shows me the following error when installing, I am working on El Capitan as a server. I hope you can help me

unable to execute 'swig': No such file or directory error: command 'swig' failed with exit status 1


Failed building wheel for M2Crypto Running setup.py clean for M2Crypto Failed to build M2Crypto Installing collected packages: M2Crypto, idna, pycparser, cffi, ipaddress, asn1crypto, enum34, cryptography, pyOpenSSL, itsdangerous, click, Werkzeug, MarkupSafe, Jinja2, Flask, SQLAlchemy, apns, oauthlib, passlib, biplist Running setup.py install for M2Crypto ... error Complete output from command /Users/appletv.admin/commandment/commandment-venv/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/jd/ysmqvr0j5ss1y9rd5syvvqdc0000gq/T/pip-build-haok9p/M2Crypto/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/jd/ysmqvr0j5ss1y9rd5syvvqdc0000gq/T/pip-hHZQFw-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/appletv.admin/commandment/commandment-venv/include/site/python2.7/M2Crypto: running install running build running build_py creating build creating build/lib.macosx-10.11-intel-2.7 creating build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/init.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/ASN1.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/AuthCookie.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/BIO.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/BN.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/callback.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/DH.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/DSA.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/EC.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/Engine.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/Err.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/EVP.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/ftpslib.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/httpslib.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/m2.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/m2urllib.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/m2urllib2.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/m2xmlrpclib.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/Rand.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/RC4.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/RSA.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/SMIME.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/threading.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/util.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto copying M2Crypto/X509.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto creating build/lib.macosx-10.11-intel-2.7/M2Crypto/PGP copying M2Crypto/PGP/init.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/PGP copying M2Crypto/PGP/constants.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/PGP copying M2Crypto/PGP/packet.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/PGP copying M2Crypto/PGP/PublicKey.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/PGP copying M2Crypto/PGP/PublicKeyRing.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/PGP copying M2Crypto/PGP/RSA.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/PGP creating build/lib.macosx-10.11-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/init.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/cb.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/Checker.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/Cipher.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/Connection.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/Context.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/Session.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/ssl_dispatcher.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/SSLServer.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/timeout.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/SSL copying M2Crypto/SSL/TwistedProtocolWrapper.py -> build/lib.macosx-10.11-intel-2.7/M2Crypto/SSL running build_ext building 'M2Crypto.__m2crypto' extension swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c swig -python -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/include -includeall -modern -builtin -outdir build/lib.macosx-10.11-intel-2.7/M2Crypto -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i unable to execute 'swig': No such file or directory error: command 'swig' failed with exit status 1

----------------------------------------

Command "/Users/appletv.admin/commandment/commandment-venv/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/jd/ysmqvr0j5ss1y9rd5syvvqdc0000gq/T/pip-build-haok9p/M2Crypto/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/jd/ysmqvr0j5ss1y9rd5syvvqdc0000gq/T/pip-hHZQFw-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/appletv.admin/commandment/commandment-venv/include/site/python2.7/M2Crypto" failed with error code 1 in /private/var/folders/jd/ysmqvr0j5ss1y9rd5syvvqdc0000gq/T/pip-build-haok9p/M2Crypto/

ghost commented 7 years ago

echo 'export PATH="/usr/local/opt/swig@3.04/bin:$PATH"' >> ~/.bash_profile

jessepeterson commented 7 years ago

Thanks @macadminsperu. Did you resolve the issue by specifying your path to swig?

ghost commented 7 years ago

If you advise me it would be good of you, I thank you very much. I'm using homebrew in El Capitan

jessepeterson commented 7 years ago

It may be best to join us over in #commandment on MacAdmins Slack.

ghost commented 7 years ago

Gracias

jessepeterson commented 7 years ago

@macadminsperu: you should still join @commandment, but i wonder if you've tried the Homebrew install of SWIG per the docs? https://github.com/jessepeterson/commandment/blob/master/INSTALL.md#installing-the-requirements

ghost commented 7 years ago

Así es! I installed swig from Homebrew

ghost commented 7 years ago

I will greatly appreciate your support.

jessepeterson commented 7 years ago

Hello @macadminsperu: were you able to get it to compile? Is swig in your $PATH?

ghost commented 7 years ago

Ya!

Instalo M2Crypto con esto:

LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" SWIG_FEATURES="-I$(brew --prefix openssl)/include" pip install m2crypto==0.22.5

y edito requeriments.txt

Elimino la línea de M2Crypto

Inicia con normalidad en 10.11.6