Search code examples
pythonwindowsm2crypto

Unable to install M2Crypto package in Windows 8.1 64 bit machine


I am using Win8.1 64 bit machine with Python 2.7 installed. I have installed swigwin 3.0.5. When I do "pip install M2Crypto" I got the following errors:

SWIG\_m2crypto.i(30) : Error: Unable to find 'openssl\opensslv.h'

SWIG\_m2crypto.i(33) : Error: Unable to find 'openssl\safestack.h'

SWIG\_evp.i(12) : Error: Unable to find 'openssl\opensslconf.h'

SWIG\_ec.i(7) : Error: Unable to find 'openssl\o,pensslconf.h'

In some links I found the suggestion is to install openssl-dev. But I could not find the equivalent package for windows (pip install openssl-dev does not work and I have done pip install pyOpenSSL which did not help me).

Thanks in advance.


Solution

  • Installing M2Crypto on Windows is a pain. Fortunately, some people have gone to the effort of creating Windows installers for M2Crypto:

    You can also use a slightly older version of the package directly from the maker's of M2Crypto as they actually provided Windows installable versions of it for a while:

    This was also a useful link: