crewAIInc/crewAI · error · ImportError

`singlestore` package not found, please run `uv add crewai-t

Error message

`singlestore` package not found, please run `uv add crewai-tools[singlestore]`

What it means

SingleStoreSearchTool raises this ImportError when the singlestore package is absent and the user answers 'no' to the click.confirm prompt offering to install it. It is the explicit opt-out path: the message tells you the exact command to run yourself (`uv add crewai-tools[singlestore]`).

Source

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

            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,
            "charset": charset,
            # SSL/TLS settings

View on GitHub (pinned to 754d7323be)

Solutions

  1. Install the extra in your environment: uv add 'crewai-tools[singlestore]' (or pip install 'crewai-tools[singlestore]').
  2. For Docker/CI, add the extra to your image build step so the prompt never appears.
  3. If the prompt is unwanted in automation, pre-install the dependency — the confirm path only triggers on ImportError.

Example fix

Dockerfile:
# before
RUN pip install crewai-tools

# after
RUN pip install 'crewai-tools[singlestore]'
Defensive patterns

Strategy: validation

Validate before calling

import importlib.util
if importlib.util.find_spec("singlestore") is None:
    import subprocess; subprocess.run(["pip", "install", "singlestore"], check=True)

Try / catch

try:
    tool = SingleStoreSearchTool(...)
except ImportError as e:
    if "singlestore" in str(e):
        # install and retry once
        import subprocess
        subprocess.run(["pip", "install", "crewai-tools[singlestore]"], check=True)
        tool = SingleStoreSearchTool(...)

Prevention

When it happens

Trigger: Instantiating SingleStoreSearchTool (or any subclass) in an environment lacking the singlestore package, then declining the interactive install prompt. Also triggered in non-TTY contexts where click.confirm reads a default 'no'.

Common situations: Automated pipelines/CI where the prompt cannot be answered and defaults to abort; users who intentionally decline the install to control their environment; docker images built without the singlestore extra.

Related errors


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