Install Kelvin SDK in Ubuntu 20.04
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:
- 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.8 to 3.12.
- Pip 3: Included by default with all Python versions starting from 3.4.
Installing
Docker
The Docker CE files in the official Ubuntu 20.04 repository 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 | |
|---|---|
1 | |
Now you install docker dependencies:
| Installing Docker Dependencies | |
|---|---|
1 | |
Install the repositories and docker authentication keys;
| Installing Docker Authentication Keys | |
|---|---|
1 | |
| Adding Docker Repositories | |
|---|---|
1 | |
And now install the latest docker version:
| Installing Docker | |
|---|---|
1 2 | |
Python
Normally Ubuntu already has Python 3 installed. You can check this by opening a terminal window and typing:
| Test Python | |
|---|---|
1 | |
To use the latest version of Python, we recommend using the deadsnakes PPA to install Python. In this case we will install Python 3.12.
| Installing Latest Python Version | |
|---|---|
1 2 3 4 | |
And now change the default Python version to 3.12:
| Changing Default Python Version | |
|---|---|
1 | |
Make sure pip is also installed:
| Check Pip Installation | |
|---|---|
1 | |
Python Virtual Environment
Before installing the Kelvin SDK we strongly recommend you use virtual python environments 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 | |
|---|---|
1 | |
Then, you can activate it with this command:
| Activate Virtual Environment | |
|---|---|
1 | |
Kelvin SDK
With all preconditions fulfilled you can now install the Kelvin SDK.
First upgrade pip to the latest version:
| Check Latest Version Pip | |
|---|---|
1 | |
And now install Kelvin SDK:
| Install Kelvin SDK | |
|---|---|
1 | |
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 | |
|---|---|
1 | |
Congratulations ! You are ready to start using the Kelvin SDK.
Other Related Links
Interesting links related to Kelvin SDK Installation
- Docker Website - https://www.docker.com/
- Python Website - https://www.python.org/
- VirtualEnv Package on Pypi - https://pypi.org/project/virtualenv/
- Kelvin SDK on Pypi - https://pypi.org/project/kelvin-sdk/