To expand the answer above:
This is a bug in M2Crypto 0.21.1. This is because SSLv2 has been removed from OpenSSL on many platforms on the grounds that it is too insecure, especially Debian [ 1 ] and Ubuntu.
Deletion during compilation was not detected. There is a widespread patch that fixes this. I have included it in the source code of M2Crypto on Github.
You can use pip to install directly from the repository as follows:
pip install -e git+https://github.com/Hypernode/m2crypto
For those who want to check out a (published) patch that fixes this: b432d36
Edit: moved to another location
source share