Skip to content

Installing zamba

Zamba has been developed and tested on macOS and Ubuntu Linux for both CPU and GPU configurations.

To install zamba

1. Install prerequisites

Prerequisites:

  • Python 3.8 or 3.9
  • FFmpeg

Python 3.8 or 3.9

We recommend Python installation using Anaconda for all platforms. For more information about how to install Anaconda, here are some useful YouTube videos of installation:

FFmpeg version 4

FFmpeg is an open source library for loading videos of different codecs. Using FFmpeg means that zamba can be flexible in terms of the video formats we support. FFmpeg can be installed on all different platforms, but requires some additional configuration depending on the platform. Here are some videos and instructions walking through FFmpeg installation:

To check that FFmpeg is installed, run ffmpeg:

$ ffmpeg

ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple clang version 12.0.0 (clang-1200.0.32.29)
...

To check your installed version, run ffmpeg -version.

2. Install zamba

On macOS, run these commands in the terminal (⌘+space, "Terminal"). On Windows, run them in a command prompt, or if you installed Anaconda an anaconda prompt (Start > Anaconda3 > Anaconda Prompt).

To install zamba:

$ pip install https://github.com/drivendataorg/zamba/releases/latest/download/zamba.tar.gz

To check what version of zamba you have installed:

$ pip show zamba

To update zamba to the most recent version if needed:

$ pip install -U https://github.com/drivendataorg/zamba/releases/latest/download/zamba.tar.gz

Operating systems that have been tested

macOS

zamba has been tested on macOS High Sierra.

Linux

zamba has been tested on Ubuntu regularly since 16.04. Tests run every week against the ubuntu-latest Github runner environment, so the version that Github uses is most likely to work. As of October 2023, that is 22.04.

Note, for Linux, you may need to install additional system packages to get zamba to work. For example, on Ubuntu, you may need to install build-essentials to have compilers.

FFMpeg 4, build-essentials, and some other packages that include more codecs to support additional videos and some other utilities can be installed with:

apt-get update && \
    apt-get install -y software-properties-common && \
    add-apt-repository -y ppa:savoury1/ffmpeg4 && \
    apt-get update && \
    apt-get -y install \
    build-essential \
    ffmpeg \
    git \
    libavcodec-dev \
    libavdevice-dev \
    libavfilter-dev \
    libavformat-dev \
    libavutil-dev \
    libsm6 \
    libswresample-dev \
    libswscale-dev \
    libxext6 \
    pkg-config \
    wget \
    x264 \
    x265

Windows

Note: zamba does not currently work on Windows because one of our dependencies fails to build.

You can try using Docker or WSL to run zamba on a Linux OS like Ubuntu on top of your Windows machine.

Using GPU(s)

zamba is much faster on a machine with a graphics processing unit (GPU), but has also been developed and tested for machines without GPU(s).

To use a GPU, you must be using an NVIDIA GPU, have installed and configured CUDA, and have installed and configured CuDNN per their specifications.

If you are using conda, these dependencies can be installed through the cudatoolkit package. If using a GPU, you will also want to make sure that you install a compatible version of PyTorch with the version of CUDA you use. See the PyTorch installation docs for the easiest way to install the right version on your system.