Last active
August 8, 2018 02:38
-
-
Save jennyq/5671585 to your computer and use it in GitHub Desktop.
Install m2crypto on Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When running "pip install m2crypto" in a virtualenv, I got the following error: | |
Downloading/unpacking m2crypto | |
Running setup.py egg_info for package m2crypto | |
Installing collected packages: m2crypto | |
Running setup.py install for m2crypto | |
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 -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 | |
Complete output from command /Users/jqian/Code/git_repos/opensource/tendenci/t-jenny001/venv/bin/python -c "import setuptools;__file__='/Users/jqian/Code/git_repos/opensource/tendenci/t-jenny001/venv/build/m2crypto/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/d1/3k02zqcs5t7fhsfgnnklk8n80000gn/T/pip-wKewyY-record/install-record.txt --single-version-externally-managed --install-headers /Users/jqian/Code/git_repos/opensource/tendenci/t-jenny001/venv/include/site/python2.7: | |
running install | |
running build | |
running build_py | |
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 -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 | |
Looks like it's complaining swig is not installed. I'm on Mac and have homebrew installed. So I ran the follwing commands to install the swig: | |
brew update | |
brew install https://raw.github.com/cobrateam/formulae/master/swig.rb | |
After swig is installed, install m2crypto: | |
pip install m2crypto | |
That fixed the problem. | |
Then |
Not working now. installed old version
pip install M2Crypto==0.21.1
@arunbhardwaj you solution works, thx.
sudo apt install swig
ubuntu use the fixed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can just use
brew install swig
to install swig