Skip to content

Instantly share code, notes, and snippets.

@HMaker
Last active May 7, 2022 02:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HMaker/d7c871a6c953ffb787ec8d6f0b794965 to your computer and use it in GitHub Desktop.
Save HMaker/d7c871a6c953ffb787ec8d6f0b794965 to your computer and use it in GitHub Desktop.
Install M2Crypto on Windows x64

Requirements

Install the following softwares:

Install M2Crypto build dependencies by running these commands on an admin PowerShell prompt:

choco install openssl
choco install swig

Build wheels

Build M2Crypto wheels from source by running these commands on a PowerShell prompt:

git clone --branch 0.38.0 https://gitlab.com/m2crypto/m2crypto
cd m2crypto
python -m venv venv --prompt=m2crypto
.\venv\Scripts\activate
python -m pip install wheel pywin32
python setup.py build --openssl="C:\Program Files\OpenSSL-Win64" --bundledlls
python setup.py bdist_wheel

Install M2Crypto on your project using the built wheel: pip install C:\path\to\m2crypto\dist\file.whl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment