chroma-core/chroma · error · ValueError
The httpx python package is not installed. Please install it
Error message
The httpx python package is not installed. Please install it with `pip install httpx`
What it means
Error "The httpx python package is not installed. Please install it with `pip install httpx`" thrown in chroma-core/chroma.
Source
Thrown at chromadb/utils/embedding_functions/huggingface_embedding_function.py:33
def __init__(
self,
api_key: Optional[str] = None,
model_name: str = "sentence-transformers/all-MiniLM-L6-v2",
api_key_env_var: str = "CHROMA_HUGGINGFACE_API_KEY",
):
"""
Initialize the HuggingFaceEmbeddingFunction.
Args:
api_key_env_var (str, optional): Environment variable name that contains your API key for the HuggingFace API.
Defaults to "CHROMA_HUGGINGFACE_API_KEY".
model_name (str, optional): The name of the model to use for text embeddings.
Defaults to "sentence-transformers/all-MiniLM-L6-v2".
"""
try:
import httpx
except ImportError:
raise ValueError(
"The httpx python package is not installed. Please install it with `pip install httpx`"
)
if api_key is not None:
warnings.warn(
"Direct api_key configuration will not be persisted. "
"Please use environment variables via api_key_env_var for persistent storage.",
DeprecationWarning,
)
if os.getenv("HUGGINGFACE_API_KEY") is not None:
self.api_key_env_var = "HUGGINGFACE_API_KEY"
else:
self.api_key_env_var = api_key_env_var
self.api_key = api_key or os.getenv(self.api_key_env_var)
if not self.api_key:
raise ValueError(
f"The {self.api_key_env_var} environment variable is not set."View on GitHub (pinned to aecdd12c8a)
When it happens
Trigger: Thrown at chromadb/utils/embedding_functions/huggingface_embedding_function.py:33 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16).
Data as JSON: /api/errors/02c3cfe26499602d.
Report an issue: GitHub.