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.
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.
Ensure your Python version exceeds 3.8 prior to installation.
# Install pymilvus compatible with Milvus v2.3.x
python -m pip install pymilvus==2.3.7
# Install pymilvus compatible with Milvus v2.4.x
python -m pip install pymilvus==2.4.4
# 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.
Ensure your Node.js version is 14 or above prior to installation.
# Install Node.js SDK compatible with Milvus v2.3.x
npm install @zilliz/milvus2-sdk-node@2.3.5
# Alternatively,
yarn add @zilliz/milvus2-sdk-node@2.3.5
# Install Node.js SDK compatible with Milvus v2.4.x
npm install @zilliz/milvus2-sdk-node@2.4.3
# Alternatively,
yarn add @zilliz/milvus2-sdk-node@2.4.3
# 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:
<!-- Install Java SDK compatible with Milvus v2.3.x -->
<dependency>
<groupId>io.milvus</groupId>
<artifactId>milvus-sdk-java</artifactId>
<version>2.3.8</version>
</dependency>
<!-- Install Java SDK compatible with Milvus v2.4.x -->
<dependency>
<groupId>io.milvus</groupId>
<artifactId>milvus-sdk-java</artifactId>
<version>2.4.2</version>
</dependency>
- For Gradle/Grails, execute:
# Install Java SDK compatible with Milvus v2.3.x
compile 'io.milvus:milvus-sdk-java:2.3.8'
# Install Java SDK compatible with Milvus v2.4.x
compile 'io.milvus:milvus-sdk-java:2.4.2'
Install Go SDK
The Go SDK is available via go get
. Explore its source code on GitHub.
# Install Go SDK compatible with Milvus v2.3.x
go get -u github.com/milvus-io/milvus-sdk-go/v2@v2.3.6
# Install Go SDK compatible with Milvus v2.4.x
go get -u github.com/milvus-io/milvus-sdk-go/v2@v2.4.1