Skip to content

Installation

To install DSPy run:

pip install dspy-ai

Or open our intro notebook in Google Colab:

By default, DSPy depends on openai==0.28. However, if you install openai>=1.0, the library will use that just fine. Both are supported.

For the optional LanceDB, Pinecone, Qdrant, ChromaDB, Marqo, or Milvus retrieval integration(s), include the extra(s) below:

Installation Command

pip install dspy-ai
pip install dspy-ai[lancedb]
pip install "dspy-ai[pinecone]"
pip install "dspy-ai[qdrant]"
pip install "dspy-ai[chromadb]"
pip install "dspy-ai[marqo]"
pip install "dspy-ai[mongodb]"
pip install "dspy-ai[weaviate]"
pip install "dspy-ai[milvus]"