Search code examples
pythonpython-3.xm2crypto

Where should I store M2Crypto files


I am using pyCharm. I ran the windowss installer of M2CryptoWin64 from:
https://pypi.python.org/pypi/M2CryptoWin64 I first navigated to the location where I downloaded the M2CryptoWin64 (different location than the python file) and typed this command:

pip install --egg M2CryptoWin64

I successfully installed it. However, when I run my python scrypt, I get the following errors: Traceback (most recent call last):

  File "C:\Users\xxx\PycharmProjects\TLSscanner\scanner_v1.py", line 1, in <module>
    import M2Crypto
  File "C:\Users\xxx\PycharmProjects\TLSscanner\M2Crypto\__init__.py", line 22, in <module>
    import __m2crypto
ImportError: No module named '__m2crypto'

Then, I moven the library folder and repeated the installation command line, which told me that the library already installed. I tried again, the same problem.


Solution

  • The last M2Crypto version (0.28.1 in the time of editing this answer) works with python 3! https://mta.openssl.org/pipermail/openssl-users/2018-February/007463.html