Skip to main content

Getting Started

This section describes how to use the Botanalytics Python SDK for your project.

This section is designed for the the latest version of Botanalytics, which is currently on private beta.

If you would like to join the beta and use the latest version of Botanalytics, follow the instructions.

Prerequisites

  • A Python project with python version 3.6 or above.

Quick Installation

Isolate your python project using a virtual environment.

Create a new virtual environment by choosing a Python interpreter and making a ./venv directory to hold it:

python3 -m venv ./venv

Activate the virtual environment:

source ./venv/bin/activate

Install Botanalytics Python SDK using pip (requires Python 3.6, or above).

pip3 install -U --user pip && pip3 install botanalytics==3.0.0

The command above will upgrade your pip to the latest version. We recommend using pip 21.3 or later due to performance improvements. Previous versions would take long time to resolve dependencies.

Step-by-step Installation Guide

1. Python Environment Setup

Check if your Python environment is already configured:

python3 --version
pip3 --version

If these packages are already installed, these commands should display version numbers for each step, and you can skip to the next step.

Otherwise, proceed with the instructions below to install them.

Fetch the relevant packages using apt, and install virtualenv using pip.

sudo apt update
sudo apt install python3-dev python3-pip

2. Virtual Environment Setup

This step is optional, but we strongly recommend isolating python projects using virtual environments.

Tools like virtualenv , virtualenvwrapper and pipenv provide isolated Python environments, which are cleaner than installing packages system-wide (as they prevent dependency conflicts). They also let you install packages without root privileges.

Create a new virtual environment by choosing a Python interpreter and making a ./venv directory to hold it:

python3 -m venv ./venv

Activate the virtual environment:

source ./venv/bin/activate

3. Install Botanalytics Python SDK

First make sure your pip version is up to date:

pip3 install -U pip

To install Botanalytics Python SDK:

pip3 install botanalytics==3.0.0