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.
-
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 Version | Python SDK | Node.js SDK | Java SDK | Go SDK | C++ | Rust SDK |
|---|---|---|---|---|---|---|
3.0.x | 3.0.1 | 3.0.6 | 3.0.10 | 3.0.0 | 3.0.3 | 3.0.2 |
2.6.x | 2.6.17 | 2.6.17 | 2.6.24 | 2.6.5 | 2.6.6 | 2.6.1 |
2.5.x | 2.5.18 | 2.5.13 | 2.5.15 | 2.5.6 | -- | -- |
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 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.
Ensure your Node.js version is 14 or above prior to installation.
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.
// 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.xmldependencies: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.ximplementation 'io.milvus:milvus-sdk-java:3.0.10'# Optional: to use BulkWriter, also addimplementation '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.
# 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.
# 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.
- Zilliz CLI
- Rust
# Add the Rust SDK to your Cargo.toml
[dependencies]
milvus-sdk-rust = "3.0.2"
use milvus::v2::prelude::*;
// Connect to Milvus
#[tokio::main]
async fn main() -> Result<()> {
let client = ClientV2::new(&ConnectConfig::new().uri("YOUR_CLUSTER_ENDPOINT")).await?;
Ok(())
}