Skip to content

Installing Ximilar Client

REPOSITORY

We have our own SDK client written in Python3.9+ (recommended). Before installing it, be sure to install Python on your system first. You will need to have also a pip tools. You can optionally install the client directly from the repository.

Basic Installation Command

If you have all the prerequisities (python, opencv), the installation can be performed in two ways:

pip install ximilar-client

or manual installation from repository (with latest changes):

git clone https://gitlab.com/ximilar-public/ximilar-client.git
pip install -e ximilar-client

On some systems you will need to write pip3 install ximilar-client instead of just pip.

Installing prerequisities

Installing pip and python

MacOS

For mac systems, pip should be part of brew package. Just be sure to install homebrew (https://brew.sh/) and run following command:

brew install python3

Linux

Here are commands for the most popular ubuntu version (python should be already installed)

sudo apt update
sudo apt install python3-pip

Windows

Installing python and opencv is nicely described on this youtube video. Basically you need to download and install python from python.org

Installing Opencv-Python

Pip

The most easiest way to install python opencv is via pip again:

pip install opencv-python

You can optionally install opencv-python-contrib, opencv-python-headless or opencv-python-contrib-headless. Headless versions are suitable for server usage with no graphical interface.

Pip - pick package

Sometimes your pip system will not install correct opencv version. On my Mac M2 (arm), I must find a correct package on pypi and then install it.

  1. Find correct version on https://pypi.org/project/opencv-contrib-python/#history
  2. Go to the version (for example 4.7.0.72) and click on Download files in the left menu. Then pick your distribution, in my case it was opencv_contrib_python-4.7.0.72-cp37-abi3-macosx_11_0_arm64.whl which is built for arm(m1/m2/...) processors.
  3. Run pip or pip3 on downloaded whl package: pip install your-downloaded-opencv-whl-package.whl

Install from opencv.org

Alternatively, you can try to install opencv directly from their page:

https://opencv.org/releases/

Building from source

The hardest way to install, however on some platforms necessary. This is the last option, for example here is tutorial for Jetson Nano:

https://qengineering.eu/install-opencv-on-jetson-nano.html

Here is way for installing opencv on M1 Macbooks:

https://moeenv.blog/?p=209&lang=en

Testing installation

After installing opencv (go to python command line) by writting python or python3 in terminal/shell and test following code:

import cv2
print(cv2.__version__)