pip install m2crypto error
I had this error on python 2.7.
This happens when the c dependencies for python aren't available and pip
attempts to install and compile a package that has a c extension.
sudo apt-get install python-dev
This resolves it for me.
After this install M2Crypto
pip install m2crypto
We are able to use m2crypto on Python 3 with following global packages libssl-dev swig python3-dev gcc
so
sudo apt-get install libssl-dev swig python3-dev gcc
should allow install m2crypto via PIP for Python 3 (tested on version 0.32)
M2Crypto (as of version 0.26) does not officially support Python 3. Officially supported Python versions are:
Programming Language :: Python :: 2.6
Programming Language :: Python :: 2.7
The issue you're having is same as described in https://gitlab.com/m2crypto/m2crypto/issues/114#note_13223251
You can find out which popular libraries are compatible with Python 3 at http://py3readiness.org/
Steps in MAC for python3.X:
First Install.
brew install openssl
Second Swig
brew install swig
Change the SWIG_FEATURES
env LDFLAGS="-L$(brew --prefix openssl)/lib" \
CFLAGS="-I$(brew --prefix openssl)/include" \
SWIG_FEATURES="-cpperraswarn -includeall -I$(brew --prefix openssl)/include" \
pip install m2crypto