fastecdsa wraps GMP — the GNU Multiple Precision Arithmetic Library — a native C library that must be present at build time. On Windows, GMP is not installed by default and there is no pre-built wheel for Python 3.10+ on win_amd64, so pip always tries to compile from source and fails immediately when it cannot find gmp.h.
If you're using Anaconda or Miniconda, conda-forge ships a pre-compiled build that includes GMP. No compiler or system dependencies required.
# If you're in a conda environment conda install -c conda-forge fastecdsa
MSYS2 provides GMP for Windows. Install it, then point pip to the headers and libraries before building. Requires a working C compiler (MSVC or MinGW-w64).
# In MSYS2 MinGW64 shell pacman -S mingw-w64-x86_64-gmp mingw-w64-x86_64-gcc # Then in your Python env set INCLUDE=C:\msys64\mingw64\include set LIB=C:\msys64\mingw64\lib pip install fastecdsa
If you don't specifically need fastecdsa's API, the cryptography package ships pre-built wheels for all platforms and covers the same use cases.
pip install cryptography # ECDSA signing with cryptography from cryptography.hazmat.primitives.asymmetric import ec key = ec.generate_private_key(ec.SECP256K1())