diff --git a/sklearn/_distributor_init.py b/sklearn/_distributor_init.py
index a0142ac808..10f094f633 100644
--- a/sklearn/_distributor_init.py
+++ b/sklearn/_distributor_init.py
@@ -8,3 +8,13 @@ For example, this is a good place to put any checks for hardware requirements.
 The scikit-learn standard source distribution will not put code in this file,
 so you can safely replace this file with your own version.
 """
+
+import os as _os
+trues = [True, '1', 'y', 'yes', 'Y', 'YES', 'Yes', 'true', 'True', 'TRUE']
+if _os.environ.get('USE_DAAL4PY_SKLEARN', False) in trues or _os.environ.get('USE_SKLEARNEX', False) in trues:
+    try:
+        from sklearnex import patch_sklearn
+        patch_sklearn()
+        del patch_sklearn
+    except (ImportError, ModuleNotFoundError):
+        pass
+    del _os
+
