crewAIInc/crewAI · error · ImportError

Failed to install singlestore package

Error message

Failed to install singlestore package

What it means

SingleStoreSearchTool offers an interactive bootstrap: if the singlestore package is missing, it prompts via click.confirm and runs `uv add crewai-tools[singlestore]`. This ImportError is raised when that subprocess exits non-zero (CalledProcessError), meaning the attempted install itself failed. The original subprocess error is chained via `from e`.

Source

Thrown at lib/crewai-tools/src/crewai_tools/tools/singlestore_search_tool/singlestore_search_tool.py:205

            conn_attrs = {}
        if tables is None:
            tables = []
        if not SINGLSTORE_AVAILABLE:
            import click

            if click.confirm(
                "You are missing the 'singlestore' package. Would you like to install it?"
            ):
                import subprocess

                try:
                    subprocess.run(
                        ["uv", "add", "crewai-tools[singlestore]"],  # noqa: S607
                        check=True,
                    )

                except subprocess.CalledProcessError as e:
                    raise ImportError("Failed to install singlestore package") from e
            else:
                raise ImportError(
                    "`singlestore` package not found, please run `uv add crewai-tools[singlestore]`"
                )

        kwargs["data_type"] = "singlestore"
        super().__init__(**kwargs)

        self.connection_args = {
            "host": host,
            "user": user,
            "password": password,
            "port": port,
            "database": database,
            "driver": driver,
            # Connection behavior
            "pure_python": pure_python,
            "local_infile": local_infile,

View on GitHub (pinned to 754d7323be)

Solutions

  1. Install the dependency manually in your environment: uv add 'crewai-tools[singlestore]' (or pip install 'crewai-tools[singlestore]').
  2. If you don't use uv, use pip: pip install singlestore; then re-instantiate the tool.
  3. Check the chained CalledProcessError (raise ... from e) for the real failure — missing uv binary, network error, or permission issue — and fix that root cause.

Example fix

# before (prompt auto-answered yes, uv add fails)
from crewai_tools import SingleStoreSearchTool
tool = SingleStoreSearchTool()

# after (pre-install, no prompt path)
# pip install 'crewai-tools[singlestore]'
from crewai_tools import SingleStoreSearchTool
tool = SingleStoreSearchTool()
Defensive patterns

Strategy: try-catch

Validate before calling

import importlib.util
if importlib.util.find_spec("singlestore") is None:
    raise RuntimeError("Run: pip install 'crewai-tools[singlestore]' before starting the app")

Try / catch

try:
    tool = SingleStoreSearchTool(...)
except ImportError as e:
    # covers both install-failure and decline branches
    raise RuntimeError(f"singlestore dependency unavailable: {e}") from e

Prevention

When it happens

Trigger: Importing/instantiating SingleStoreSearchTool without singlestore installed, answering 'y' to the install prompt, while `uv` is missing from PATH, the project is not a uv workspace, the network is down, or the extra name is unavailable in the installed crewai-tools version.

Common situations: Running in an environment without uv installed (plain pip/conda users); running with a read-only project directory; CI runners where the interactive prompt is auto-confirmed but the package manager can't write; version mismatches where the [singlestore] extra does not exist.

Related errors


AI-assisted analysis of crewAIInc/crewAI@754d7323be (2026-08-15). Data as JSON: /api/errors/e67b520b2630968c. Report an issue: GitHub.