Skip to content

Linux

(Ubuntu / Debian) Install requirements with

Before 24.04:

apt-get install 7zip python3-dev python3-pip python3-distutils unrar unzip

Since 24.04:

apt-get install 7zip python3-dev python3-pip python3-setuptools unrar unzip

(Fedora / CentOS) Install requirements with

yum install python3-devel python3-pip python3-distutils

(Raspbian and maybe other ARM based distro)

thnx to @inquilino for the fixes/updates

sudo apt-get update
sudo apt-get install libxml2-dev libxslt1-dev python3-dev python3-libxml2 python3-lxml unrar-free ffmpeg libatlas-base-dev
  1. Upgrade Python to version 3.8 or greater.
  2. Download latest release of Bazarr here

    wget https://github.com/morpheus65535/bazarr/releases/latest/download/bazarr.zip
    
  3. Create the bazarr directory

    sudo mkdir /opt/bazarr
    
  4. Extract the content of the zipped release to the previously created bazarr directory

    sudo unzip bazarr.zip -d /opt/bazarr
    
  5. cd into /opt/bazarr

    cd /opt/bazarr
    
  6. Install the Python requirements:

    python3 -m pip install -r requirements.txt
    

    If you run into an error like this one:

    error: externally-managed-environment
    
    × This environment is externally managed
    ╰─> To install Python packages system-wide, try apt install
        python3-xyz, where xyz is the package you are trying to
        install.
    
        If you wish to install a non-Debian-packaged Python package,
        create a virtual environment using python3 -m venv path/to/venv.
        Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
        sure you have python3-full installed.
    
        If you wish to install a non-Debian packaged Python application,
        it may be easiest to use pipx install xyz, which will manage a
        virtual environment for you. Make sure you have pipx installed.
    
        See /usr/share/doc/python3.12/README.venv for more information.
    
    note: If you believe this is a mistake, please contact your Python
    installation or OS distribution provider. You can override this, at
    the risk of breaking your Python installation or OS, by passing
    --break-system-packages.
    hint: See PEP 668 for the detailed specification.
    

    Disable EXTERNALLY-MANAGED flag using this command before retrying Python requirements installation or consider using venv instead:

    find / -type f -name EXTERNALLY-MANAGED -execdir mv {} EXTERNALLY-MANAGED.bkp \;
    

    Note

    (Raspbian) Don't worry about lxml not being installed at this step, you have installed the module through apt-get anyway.

    Older Raspberry Pi (ARMv6)

    On ARMv6 devices (e.g. older Raspberry Pis, find out with uname -m), numpy installed from pip might contain instruction set that is not compatible with the architecture (Ref). The solution is to replace it with the version from apt repository:

    python3 -m pip uninstall numpy
    sudo apt-get install python3-numpy
    
  7. Change ownership to your preferred user for running programs (replace both instances of $USER, or leave it to change ownership to current user)

    sudo chown -R $USER:$USER /opt/bazarr
    
  8. You can now start bazarr using the following command:

    python3 bazarr.py
    
  9. Open your browser and go to http://localhost:6767/

Please see the autostart page for systemd/upstart configuration instructions.