Skip to content

Install Kelvin SDK in Ubuntu

Requirements

To get started is also very easy. Just ensure you have Docker, Python 3 and Pip 3 installed. Specific installation information on each of these for Windows, Mac and Linux can be found here:

  • Ubuntu: Minimum version 22.04 LTS. Supported up to 26.04 LTS. Always use a long term support release.
  • Docker: Always use the latest version or at least version ≥ 24.0.7 - https://docs.docker.com/engine/install/.
  • Python 3: Supported versions from 3.10 to 3.12.
  • Pip 3: Provided by the python3-pip package and automatically included inside every Python virtual environment.

Installing

Docker

The Docker CE packages in the official Ubuntu repositories are old and it is strongly recommended you do not use these ones. To start make sure these are not installed on your computer.

Remove Existing Installations
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove -y $pkg; done

Now you install docker dependencies:

Installing Docker Dependencies
sudo apt-get update
sudo apt-get install -y ca-certificates curl

Install the docker authentication keys;

Installing Docker Authentication Keys
1
2
3
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

Then add the Docker repository to your apt sources:

Adding Docker Repositories
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

And now install the latest docker version:

Installing Docker
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Python

Normally Ubuntu already has Python 3 installed. You can check this by opening a terminal window and typing:

Test Python
python3 --version

Use the Python version supplied by the official Ubuntu repositories. Every supported Ubuntu LTS release ships a Python version that works with the Kelvin SDK.

Ubuntu Release Default Python
22.04 LTS 3.10
24.04 LTS 3.12

Install Python together with the virtual environment and pip packages:

Installing Python
sudo apt-get update
sudo apt-get install -y python3 python3-venv python3-pip

Python Virtual Environment

Before installing the Kelvin SDK you must use a virtual python environment for your Kelvin SDK so that there are no conflicts, dependency issues or incompatibilities between Kelvin SDK and other python projects you work on.

In the Terminal window let's create a virtual environment and give it a name. In this case we will call it kelvinai.

Create Virtual Python Environment
python3 -m venv kelvinai

Then, you can activate it with this command:

Activate Virtual Environment
source kelvinai/bin/activate

Kelvin SDK

With all preconditions fulfilled you can now install the Kelvin SDK.

First upgrade pip to the latest version:

Check Latest Version Pip
pip3 install --upgrade pip

And now install Kelvin SDK:

Install Kelvin SDK
pip3 install kelvin-sdk

If you get an error that pip3 can not find a version that satisfies kelvin-sdk, make sure you are running a version of Python that is supported by kelvin-sdk.

To check the latest supported Python versions see the kelvin-sdk package details at pypi - https://pypi.org/project/kelvin-sdk/.

And finally check the Kelvin SDK version:

Check Kelvin SDK Version
kelvin --version

Congratulations ! You are ready to start using the Kelvin SDK.

Interesting links related to Kelvin SDK Installation