Skip to main content

Install SDKs

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 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++
3.0.x3.0.13.0.53.0.83.0.0-beta3.0.2
2.6.x2.6.172.6.172.6.242.6.52.6.6
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 pymilvus
python -m pip install pymilvus

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

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 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:

    xml
    <!-- Install Java SDK compatible with Milvus v2.5.x -->
    <dependency>
    <groupId>io.milvus</groupId>
    <artifactId>milvus-sdk-java</artifactId>
    <version>2.6.24</version>
    </dependency>
  • For Gradle/Grails, execute:

    bash
    # Install Java SDK compatible with Milvus v2.5.x
    compile 'io.milvus:milvus-sdk-java:2.6.24'

If your cluster is compatible with Milvus v3.0.x (Public Preview), please change 2.6.24 in the above commands to 3.0.8.

Install Go SDK

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

bash
# Install Go SDK compatible with Milvus v2.5.x
go get -u github.com/milvus-io/milvus-sdk-go/v2@v2.6.5

If your cluster is compatible with Milvus v3.0.x (Public Preview), please change 2.6.5 in the above commands to 3.0.0-beta.

Install C++ SDK

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

shell
git clone https://github.com/milvus-io/milvus-sdk-cpp.git
cd milvus-sdk-cpp
bash scripts/install_deps.sh
make

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

If your cluster is compatible with Milvus v3.0.x (Public Preview), please use the 3.0.2 release.

Ctrl I