💻Client SDK

This guide provides instructions for installing the enVector SDK across different environments. Whether you're working on a local machine or in the cloud, we've got you covered.

Prerequisites

  • Python version requirements:

    • Linux & Google Colab: Python 3.9 ≤ version < 3.14

    • macOS: Python 3.9 ≤ version < 3.13

  • pip (Python package installer)

  • virtualenv (recommended for isolated environments)

⚠️ Note: macOS has a Python version limitation due to numpy compatibility issues. Python 3.13 is not supported on macOS as the required numpy version cannot be compiled or supported on this platform.

Installation by Platform

🐧 Linux (x86_64)

This guide is for users on common Linux distributions with an x86_64 architecture.

1. Install System Dependencies (Python 3.9 ≤ version < 3.14)

Linux distributions have different package managers depending on the distribution. The most reliable way to manage Python versions without interfering with system packages is to use pyenv.

  • If you don't have Python 3.9 ≤ version < 3.14, we strongly recommend installing it with pyenv. This tool lets you install specific Python versions in your user directory.

a. Install pyenv build dependencies. Before installing pyenv, you need packages to build Python from source.

  • On Ubuntu/Debian:

    sudo apt-get update && sudo apt-get install make build-essential libssl-dev zlib1g-dev \
        libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
        libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
  • On Fedora/CentOS/RHEL:

    sudo yum install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite \
        sqlite-devel openssl-devel xz xz-devel libffi-devel

b. Install and configure pyenv. This script will install pyenv and set up the necessary shell environment variables.

# Install pyenv
curl https://pyenv.run | bash

# Add pyenv to your shell's startup file (e.g., ~/.bashrc)
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"

# Restart your shell or run 'source ~/.bashrc' for changes to take effect

c. Install Python 3.11 (recommended for best compatibility). With pyenv installed, you can now install Python 3.11.

pyenv install 3.11
pyenv global 3.11

ℹ️ Note: You can also use Python 3.9 ≤ version < 3.14, but Python 3.11 is recommended for optimal performance and compatibility.

🍎 macOS (Apple Silicon)

This guide is for users on macOS with Apple Silicon chips (M1, M2, M3, etc.).

1. Install System Dependencies

We'll use Homebrew to install required packages like Python and LibOMP. This greatly simplifies the setup process.

  • If you don't have Homebrew, run this command first:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Once Homebrew is ready, install the dependencies:

    brew install virtualenv [email protected] libomp

ℹ️ Note: If you prefer not to use Homebrew, you must manually install Python 3.11, virtualenv, and libomp using an alternative method.

☁️ Google Colab

Using the enVector SDK in Google Colab

This guide explains how to install and use the enVector SDK in a Google Colab environment. Note: Official support for Colab will begin with version 1.0.3, which is scheduled for release soon. Once available, you can easily install the SDK directly within a Colab notebook.

1. How to Install (After Version 1.0.3 is Released)

After the new version is published to PyPI, open a Google Colab notebook and run the following command in a code cell. The ! prefix executes shell commands, and specifying the version ensures you get the Colab-compatible release.

!pip install "pyenvector[colab]==1.2.0"

The [colab] suffix is an extra dependency specifier. It ensures that, in addition to the base pyenvector package, all Colab-specific dependencies are installed (e.g., additional packages or environment configurations needed for seamless operation in Google Colab).

  • pyenvector[colab] → Installs the base package along with synchronized Colab-specific dependencies, ensuring compatibility in the Colab environment.

  • ⚠️ pyenvector → Installs only the base package with potentially newer dependency versions, which may cause certain Colab-related functionality to be unavailable.

2. Verify the Installation

After the installation is complete, you can import and use the SDK in any subsequent cell. To confirm it's working correctly, run the following code:

import pyenvector as ev

print("enVector SDK installed and imported successfully!")
print(f"Version: {ev.__version__}")

ℹ️ Note: Google Colab runs in an isolated environment, so you don't need to create a virtual environment or worry about package conflicts.

Common Installation Steps

Once you have Python and system dependencies installed on your platform, follow these common steps to complete the SDK installation.

ℹ️ Note: Google Colab users can skip this section as they only need to run the pip install command.

1. Create and Activate a Virtual Environment

Using a virtual environment prevents conflicts with other Python projects.

  1. Install virtualenv (if not already installed):

    pip install virtualenv
  2. Create the environment using your Python version:

    # For Linux and macOS
    virtualenv -p python3.11 envector_venv
  3. Activate the environment:

    source envector_venv/bin/activate

    Your terminal prompt will now be prefixed with (envector_venv).

2. Install the enVector SDK

Finally, install the SDK from PyPI using pip. This command will download and install the pyenvector package inside your active virtual environment.

pip install pyenvector

Verification

After installation, you can verify that the SDK is working correctly by running:

import pyenvector as ev

print("enVector SDK installed and imported successfully!")
print(f"Version: {ev.__version__}")

Next Steps

Once you have the SDK installed, you can:

  1. Generate your API key following the Key Generation guide

  2. Follow the Quick Start guide to begin using the SDK

  3. Check out the API documentation for detailed usage examples

Troubleshooting

If you encounter any issues during installation:

  • Ensure you have a supported Python version installed:

    • Linux : Python 3.9 ≤ version < 3.14

    • macOS: Python 3.9 ≤ version < 3.13

  • Colab environment

    • Make sure you include the Colab extras when installing:

      !pip install "pyenvector[colab]"
  • Make sure you're using a virtual environment to avoid conflicts

  • Check that all system dependencies are properly installed

  • For Linux users, ensure pyenv is properly configured in your shell

  • For macOS users, verify that Homebrew and libomp are correctly installed

Last updated