How to install M2Crypto for python in Windows x64

2k Views Asked by At

I need to use M2Crypto in my python script. I downloaded the M2Crypto windows installer from: https://pypi.python.org/pypi/M2CryptoWin64

When I imported the M2Crypto in my script using: import M2Crypto and run my script, I get errors.

Traceback (most recent call last):
  File "C:/Users/xxx/PycharmProjects/TLSscanner/scanner_v2.py", line 4, in <module>
    from M2Crypto.Err import SSLError
  File "C:\Users\xxx\PycharmProjects\TLSscanner\M2Crypto\__init__.py", line 22, in <module>
    import __m2crypto
ImportError: No module named '__m2crypto'

I do not know where to place the M2Crypto folder after I installed it and extracted it? Can you clarify to me where packages need to be placed in order for the script to run?

EDIT: This is the successful installation path. Shall I put my python script in the same path? The error I get when running my script (in another folder for the project) is shown above. enter image description here

0

There are 0 best solutions below