Skip to main content

Install SDKs

Zilliz Cloud offers a managed Milvus vector database as a service. Six SDK options exist to facilitate cluster connections: Python, Java, Go, Node.js, C++, and Rust.

Notes
  • Zilliz Cloud consistently upgrades clusters to ensure version compatibility. For details, visit the Manage Organization Settings 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.

SDK Compatibility​

The following table lists the compatible SDK versions of each Milvus version.

Milvus VersionPython SDKNode.js SDKJava SDKGo SDKC++Rust SDK
3.0.x3.0.13.0.63.0.103.0.03.0.33.0.2
2.6.x2.6.172.6.172.6.242.6.52.6.62.6.1
2.5.x2.5.182.5.132.5.152.5.6----

Install PyMilvus: Python SDK​

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

Notes

Ensure your Python version exceeds 3.8 prior to installation.

bash
# Install or update PyMilvus to the latest v3.0.x
pip install --upgrade pymilvus==v3.0.1

# Install the Model library for embedding operations (optional)
pip install pymilvus[model]

# Verify the installed version
python -c "from pymilvus import __version__; print(__version__)"

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.

bash
npm install @zilliz/milvus2-sdk-node
# Alternatively,
yarn add @zilliz/milvus2-sdk-node

# 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.

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

// Import the SDK as an 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:

    xml
    <!-- Install the Java SDK compatible with Milvus v3.0.x -->
    <dependency>
    <groupId>io.milvus</groupId>
    <artifactId>milvus-sdk-java</artifactId>
    <version>3.0.10</version>
    </dependency>
    <!-- Optional: to use BulkWriter, also add -->
    <dependency>
    <groupId>io.milvus</groupId>
    <artifactId>milvus-sdk-java-bulkwriter</artifactId>
    <version>3.0.10</version>
    </dependency>
  • For Gradle/Grails, execute:

    bash
    # Install the Java SDK compatible with Milvus v3.0.x
    implementation 'io.milvus:milvus-sdk-java:3.0.10'
    # Optional: to use BulkWriter, also add
    implementation 'io.milvus:milvus-sdk-java-bulkwriter:3.0.10'

Install Go SDK​

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

bash
# Install the Go SDK compatible with Milvus v3.0.x
go get -u github.com/milvus-io/milvus/client/v3

Install C++ SDK​

The C++ SDK is available as follows. Explore its source code on GitHub.

shell
# Install the C++ SDK (Milvus 3.0.x, release v3.0.3) from source
git clone https://github.com/milvus-io/milvus-sdk-cpp.git
cd milvus-sdk-cpp
git checkout v3.0.3
bash scripts/install_deps.sh
make

# install the sdk
make install # install to /usr/local

Install Rust SDK​

For Milvus's Rust SDK, use Cargo. Access its source code on GitHub.

shell
# Add the Rust SDK to your Cargo.toml
[dependencies]
milvus-sdk-rust = "3.0.2"