{"record":{"id":"9011b5988206b667","repo":"run-llama/llama_index","slug":"llama-index-embeddings-clip-package-not-found-p","errorCode":null,"errorMessage":"`llama-index-embeddings-clip` package not found, please run `pip install llama-index-embeddings-clip` and `pip install git+https://github.com/openai/CLIP.git`","messagePattern":"`llama-index-embeddings-clip` package not found, please run `pip install llama-index-embeddings-clip` and `pip install git\\+https://github\\.com/openai/CLIP\\.git`","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"critical","filePath":"llama-index-core/llama_index/core/embeddings/utils.py","lineNumber":87,"sourceCode":"                \"Original error:\\n\"\n                f\"{e!s}\"\n                \"\\nConsider using embed_model='local'.\\n\"\n                \"Visit our documentation for more embedding options: \"\n                \"https://developers.llamaindex.ai/python/framework/module_guides/\"\n                \"models/embeddings/\"\n                \"\\n******\"\n            )\n    # for image multi-modal embeddings\n    elif isinstance(embed_model, str) and embed_model.startswith(\"clip\"):\n        try:\n            from llama_index.embeddings.clip import ClipEmbedding  # pants: no-infer-dep\n\n            clip_model_name = (\n                embed_model.split(\":\")[1] if \":\" in embed_model else \"ViT-B/32\"\n            )\n            embed_model = ClipEmbedding(model_name=clip_model_name)\n        except ImportError as e:\n            raise ImportError(\n                \"`llama-index-embeddings-clip` package not found, \"\n                \"please run `pip install llama-index-embeddings-clip` and `pip install git+https://github.com/openai/CLIP.git`\"\n            )\n\n    if isinstance(embed_model, str):\n        try:\n            from llama_index.embeddings.huggingface import (\n                HuggingFaceEmbedding,\n            )  # pants: no-infer-dep\n\n            splits = embed_model.split(\":\", 1)\n            is_local = splits[0]\n            model_name = splits[1] if len(splits) > 1 else None\n            if is_local != \"local\":\n                raise ValueError(\n                    \"embed_model must start with str 'local' or of type BaseEmbedding\"\n                )\n","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/embeddings/utils.py#L69-L105","documentation":"Passing an embed_model string starting with 'clip' (e.g. 'clip:ViT-B/32') makes resolve_embed_model build a ClipEmbedding for multi-modal image embedding. That class lives in the optional llama-index-embeddings-clip integration plus OpenAI's CLIP repo, neither bundled with core — an ImportError is raised telling you exactly what to install.","triggerScenarios":"Settings.embed_model = 'clip' or 'clip:ViT-L/14' (or LlamaParse multimodal defaults using CLIP) without llama-index-embeddings-clip installed; fresh environment cloned from a project that relied on CLIP.","commonSituations":"Following multi-modal retrieval examples on a slim install; CI missing the extra; the CLIP git dependency failing to install on some platforms.","solutions":["pip install llama-index-embeddings-clip && pip install git+https://github.com/openai/CLIP.git","Alternatively switch to another multimodal embedding you already have installed and pass it as an instance","Pin CLIP install in requirements.txt so CI reproduces it"],"exampleFix":"// before\nSettings.embed_model = \"clip:ViT-B/32\"  # ImportError\n\n// after\n# pip install llama-index-embeddings-clip\n# pip install git+https://github.com/openai/CLIP.git\nSettings.embed_model = \"clip:ViT-B/32\"","handlingStrategy":"fallback","validationCode":"try:\n    import llama_index.embeddings.clip  # noqa: F401\n    has_clip = True\nexcept ImportError:\n    has_clip = False\nembed_model = \"clip:ViT-B/32\" if has_clip else \"local:BAAI/bge-small-en-v1.5\"","typeGuard":null,"tryCatchPattern":"try:\n    Settings.embed_model = \"clip:ViT-B/32\"\nexcept ImportError as e:\n    if \"llama-index-embeddings-clip\" in str(e):\n        raise RuntimeError(\"pip install llama-index-embeddings-clip and CLIP, or choose another model\") from e\n    raise","preventionTips":["Install and pin both llama-index-embeddings-clip and the CLIP git dep in requirements","Feature-detect the import before selecting 'clip:...' in multi-modal pipelines","Document that CLIP requires a GPU-friendly environment (torch, ftfy, regex)"],"tags":["embeddings","clip","multi-modal","dependencies","installation"],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}