barKoder SDK - Python library
Requirements #
Basic requirments #
- A 64-bit OS based on Linux, for an x86-64 CPU architecture. As a general guideline Ubuntu 22.04 or newer is recommended. Install commands given below assume a Debian distro is used (but are not limited to).
- python3 (version 3.11 or newer; contact us if you need support for older versions)
- Most linux distos come with python. If not already present, it can be installed
Install python3 #
sudo apt-get install python3
Install pip #
You will need openCV and numpy to run the sample app. These can be installed via pip
sudo apt install python3-pip
//or
sudo dnf install python3-pip
//depending on the linux distribution
Install openCV-python, numpy and other sample app requirements #
With pip installed you should install opencv-python. You will need it to run the sample app
pip install opencv-python
pip install numpy
//to change the name of the running app
pip install setproctitle
Install curl (optional) #
Curl might be needed for licensing, depending on the type of license used. In particular, curl from snap is required (ref https://snapcraft.io/curl). It can be installed with:
sudo apt install snapd
sudo snap install curl
Using a specific python version #
If you need to use a specific python version, i.e. running the sample app like so:
python3.11 run.py
you may need to install a side-by-side python version, different than the one you have, for example:
sudo apt-get install python3.11
sudo dnf install python3.11
and OpenCV for Python should also be available under that version, and can be installed with:
python3.11 -m pip install opencv-python
python3.11 -m pip install --upgrade --ignore-installed pip
//ignore-installed is in case your pip was installed by the system package manager
Eventually, when running the sample app (which you can download from our repository) if you get an error like this:
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
You are probably on a RedHat distribution and you may need to add this:
sudo yum install mesa-libGL
Finally get our python lib #
barKoder.com repository #
After you've installed all the necessary requirements to run the software, head over to our repository and download the python library.
Unzip the file and you should find a fully working how-to-start app which should be sufficient to get you started.
github repository #
Alternatively, you can simply clone it from GitHub. The repository includes detailed instructions for running the software, so you might find that method convenient as well.