Last modified: Jun 10, 2026

Install Weaviate Client Python

Weaviate is an open-source vector database. You can use it to store and search data using vectors. To interact with Weaviate from Python, you need the Weaviate client library. This guide shows you how to install it step by step.

Prerequisites

Before you start, make sure you have Python installed. Weaviate client works with Python 3.8 or higher. Check your Python version using the command below.


python --version

If you see a version lower than 3.8, update Python first. You also need pip, the Python package installer. Most Python installations include pip.

Install the Weaviate Client

The easiest way to install the Weaviate client is with pip. Open your terminal or command prompt. Run the following command.


pip install weaviate-client

This command downloads and installs the latest version. The installation process takes a few seconds. You will see progress bars and a success message at the end.

Verify the Installation

After installation, verify it worked. Open a Python interpreter or create a new Python file. Import the weaviate module.


# Verify Weaviate client installation
import weaviate

print("Weaviate client installed successfully!")
print("Version:", weaviate.__version__)

Weaviate client installed successfully!
Version: 4.5.0

If you see the version number, everything is working. If you get an error, double-check the installation step.

Connect to a Weaviate Instance

Now you can connect to a Weaviate instance. You need the URL of your Weaviate server. For a local instance, use http://localhost:8080. For a cloud instance, use your cluster URL.


# Connect to Weaviate
import weaviate

# Replace with your Weaviate URL
client = weaviate.connect_to_local()

# Or for a cloud instance:
# client = weaviate.connect_to_wcs(
#     cluster_url="https://your-cluster.weaviate.network",
#     auth_credentials=weaviate.auth.AuthApiKey("your-api-key")
# )

print("Connected to Weaviate:", client.is_ready())

Connected to Weaviate: True

The is_ready() method returns True when the connection works. If it returns False, check your server status.

Install with Specific Version

Sometimes you need a specific version. Use the == operator to install a particular version.


pip install weaviate-client==3.25.0

Check the Weaviate documentation for version compatibility. Different Weaviate server versions require different client versions.

Install in a Virtual Environment

Using a virtual environment is a good practice. It keeps your project dependencies separate. Create and activate a virtual environment first.


# Create a virtual environment
python -m venv weaviate-env

# Activate on Windows
weaviate-env\Scripts\activate

# Activate on macOS/Linux
source weaviate-env/bin/activate

Then install the client inside the environment.


pip install weaviate-client

This keeps your main Python installation clean. You can delete the environment later without affecting other projects.

Run Your First Query

Let's run a simple query. This example searches for objects in a class called "Document". You need to have data in your Weaviate instance first.


import weaviate

client = weaviate.connect_to_local()

# Fetch all objects from the "Document" class
response = client.collections.get("Document").fetch_objects()

for obj in response.objects:
    print(obj.properties)

{'title': 'First Document', 'content': 'This is the content of the first document.'}
{'title': 'Second Document', 'content': 'Another document here.'}

If you see output, your client works correctly. You can now build vector search applications.

Common Installation Issues

Sometimes you might see errors. Here are common problems and solutions.

Error: "No module named weaviate". This means pip did not install the package. Run pip install weaviate-client again. Ensure you are in the correct Python environment.

Error: "Permission denied". On macOS or Linux, use sudo pip install weaviate-client. On Windows, run the terminal as administrator.

Error: "pip is not recognized". This means pip is not in your PATH. Reinstall Python and check "Add Python to PATH" during installation.

Upgrade the Client

To upgrade to the latest version, use the --upgrade flag.


pip install --upgrade weaviate-client

Upgrade regularly to get new features and bug fixes. Check the release notes before upgrading to avoid breaking changes.

Uninstall the Client

If you need to remove the client, use the uninstall command.


pip uninstall weaviate-client

This removes the package from your system. You can reinstall it later if needed.

Conclusion

Installing the Weaviate client in Python is straightforward. Use pip to install it, verify with a simple import, and connect to your Weaviate instance. This client lets you build powerful vector search applications. Start with a small project and explore the full capabilities of Weaviate.