--- a/sklearn/_build_utils/openmp_helpers.py +++ b/sklearn/_build_utils/openmp_helpers.py @@ -18,7 +18,7 @@ else: compiler = compiler.__class__.__name__ - if sys.platform == "win32": + if sys.platform == "win32" and 'MSC' in sys.version: return ["/openmp"] elif sys.platform == "darwin" and "openmp" in os.getenv("CPPFLAGS", ""): # -fopenmp can't be passed as compile flag when using Apple-clang.