Skip to main content
Version: User Guides (Cloud)

Install SDKs

Discover how to seamlessly install Milvus SDKs, allowing efficient connections to Zilliz Cloud clusters.

Overview

Zilliz Cloud offers a managed Milvus vector database as a service. Four SDK options exist to facilitate cluster connections: Python, Java, Go, or Node.js.

📘Notes
  • Zilliz Cloud consistently upgrades clusters to ensure version compatibility. For details, visit the Set up Maintenance Window page. If connection issues arise due to SDK version discrepancies, heed the provided prompts to revert to a compatible SDK version. We'll notify you post-maintenance, post which you can upgrade your SDK without concerns.

  • All SDKs below offer both a stable version and a beta version. The stable version is intended for common clusters, while the beta version corresponds to beta clusters. If you have upgraded your clusters to the beta version, ensure that you also upgraded your SDKs to the beta version.

Install PyMilvus: Python SDK

PyMilvus is Milvus's Python SDK. Access its source code on GitHub.

📘Notes

Ensure your Python version exceeds 3.7 prior to installation.

# Install specific PyMilvus
python -m pip install pymilvus==2.3.7

# Update PyMilvus to the newest version
python -m pip install --upgrade pymilvus

# Verify installation success
python -m pip list | grep pymilvus

Install Node.js SDK

For Milvus's Node.js SDK, employ npm or yarn. Access its source code on GitHub.

📘Notes

Ensure your Node.js version is 14 or above prior to installation.

# Installing a specific version
npm install @zilliz/milvus2-sdk-node@2.3.5
# Alternatively,
yarn add @zilliz/milvus2-sdk-node@2.3.5

# Upgrade to the latest version
npm update @zilliz/milvus2-sdk-node
# Alternatively,
yarn upgrade @zilliz/milvus2-sdk-node

# Verify installation
npm list | grep @zilliz/milvus2-sdk-node
# or
yarn list | grep @zilliz/milvus2-sdk-node

You can use this SDK as either a CommonJS or an ES6 module. Typically, for npm init projects, use CommonJS. For npm init es6 ones, ES6 is preferable.

// Import the SDK as a CommonJS module
const { MilvusClient } = require("@zilliz/milvus2-sdk-node")

// Import the SDK as a ES6 module
import { MilvusClient } from "@zilliz/milvus2-sdk-node"

Install Java SDK

Use Apache Maven or Gradle/Grails to obtain the SDK. Access the source code on GitHub.

  • For Apache Maven, append this to the pom.xml dependencies:
<dependency>
<groupId>io.milvus</groupId>
<artifactId>milvus-sdk-java</artifactId>
<version>2.3.5</version>
</dependency>
  • For Gradle/Grails, execute:
# Use this for beta clusters
compile 'io.milvus:milvus-sdk-java:2.3.5'

Install Go SDK

The Go SDK is available via go get. Explore its source code on GitHub.

go get -u github.com/milvus-io/milvus-sdk-go/v2@v2.3.6