diff --git a/python-package/packager/nativelib.py b/python-package/packager/nativelib.py index 1852e0d2d909..1a3df2ea8989 100644 --- a/python-package/packager/nativelib.py +++ b/python-package/packager/nativelib.py @@ -138,6 +138,9 @@ def locate_or_build_libxgboost( sys_prefix / "Library", sys_prefix / "Library" / "bin", sys_prefix / "Library" / "lib", + sys_prefix / "Library" / "mingw-w64", + sys_prefix / "Library" / "mingw-w64" / "bin", + sys_prefix / "Library" / "mingw-w64" / "lib", ] sys_prefix_candidates = [ p.expanduser().resolve() for p in sys_prefix_candidates diff --git a/python-package/xgboost/libpath.py b/python-package/xgboost/libpath.py index 58c78df090ae..92d46a0bb77d 100644 --- a/python-package/xgboost/libpath.py +++ b/python-package/xgboost/libpath.py @@ -38,6 +38,9 @@ def find_lib_path() -> List[str]: os.path.join(sys.base_prefix, "Library"), os.path.join(sys.base_prefix, "Library", "bin"), os.path.join(sys.base_prefix, "Library", "lib"), + os.path.join(sys.base_prefix, "Library", "mingw-w64"), + os.path.join(sys.base_prefix, "Library", "mingw-w64", "bin"), + os.path.join(sys.base_prefix, "Library", "mingw-w64", "lib"), ] ) dll_path = [os.path.join(p, "xgboost.dll") for p in dll_path]