A monkey patch for cygwinccompiler which enables you to use MinGW-w64 as the default compiler on Windows.
If you want to try Cython but doesn't have MSVC installed, this is for you.
WARNING: This project is not widely tested and is only for hobby.
pip install git+https://github.com/imba-tjd/mingw64ccompiler
python -m mingw64ccompiler install_specs # β Run once
python -m mingw64ccompiler install # β‘ Run in every venv
Then python setup.py build_ext -i
, cythonize -i
, mypyc
, pip wheel .
, pip install --no-build-isolation
will use gcc as the default compiler, and it would link with ucrt.
To programmally patch, use __import__('mingw64ccompiler').patch()
. This doesn't require you to use install
command firstly, but cythonize
and other CLI tools won't work.
To use -Wall
rather than -O3
, set MINGW64CCOMPILER_DEBUG
environment variable.
- β Create a spec file in mingw installation dir to let gcc link with ucrt. This may not work. This is not required if your mingw is compiled with
--with-default-msvcrt=ucrt
. - β‘ Use
sitecustomize.py
to overriede the return value ofget_default_compiler()
so that the default compiler is gcc.
unknown conversion type character 'z' in format
when usingfrom cpython cimport array
- I have never used Anaconda and know nothing about it
- psutil: giampaolo/psutil#330
- lxml: Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
- llvmlite: requires cmake
- numpy: mt19937.h:27:1: error: multiple storage classes in declaration specifiers
- scipy: BLAS & LAPACK libraries need to be installed
- pyodbc: it sets MSVC-specific args in setup.py
- pytorch extension: when IS_WINDOWS, all compiler related code is set to use MSVC