From 52480c8c859e7a08a6c1f62a19899ba9b9b0f6f4 Mon Sep 17 00:00:00 2001 From: Yacklin Wong Date: Thu, 6 Nov 2025 16:44:45 -0400 Subject: [PATCH] corrected problematic pip commands generated by _download_additional_modules --- src/evaluate/loading.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/evaluate/loading.py b/src/evaluate/loading.py index a9cbbe60..bb33855c 100644 --- a/src/evaluate/loading.py +++ b/src/evaluate/loading.py @@ -260,12 +260,13 @@ def _download_additional_modules( lib = importlib.import_module(library_import_name) # noqa F841 except ImportError: library_import_name = "scikit-learn" if library_import_name == "sklearn" else library_import_name + library_import_path = "scikit-learn" if library_import_path == "sklearn" else library_import_path needs_to_be_installed.add((library_import_name, library_import_path)) if needs_to_be_installed: raise ImportError( f"To be able to use {name}, you need to install the following dependencies" f"{[lib_name for lib_name, lib_path in needs_to_be_installed]} using 'pip install " - f"{' '.join([lib_path for lib_name, lib_path in needs_to_be_installed])}' for instance'" + f"{' '.join([lib_path for lib_name, lib_path in needs_to_be_installed])}' for instance." ) return local_imports