Skip to content

Install Overview

Andrey edited this page Sep 4, 2021 · 3 revisions

Python modules short description

Python MediaDC module requires a number of packages to work, that is listed below. You can install it manually or automatically on configuration page (recommended).

Type Packages Description
required PIL, numpy Required packages for working Python module
optional scipy, pywt, pyheif Optional packages for additional functionality (hashing algoritmhs)
boost hexhamming This packages allows increase Python module speed (x2-x8)

If you use PostgreSQL then you additional need asn1crypto. But it almost always already installed in system.

If you use MySQL/MariaDB then you optionally need(depends which authentication methods for DB you use):

cryptography, pynacl

scipy module need for phash algorithm.

pywt(named pywavelets) need for whash algorithm.

For processing HEIC images (Apple format) need module pyheif.

hexhamming only need for speed up of comparing photos hashes. But it is fast even without it.

Auto Install algorithm

  1. Check if PIP module with version > 9.0 is present.(Centos/Fedora by default has very old PIP, so to use global PIP during auto install upgrade it)

    If PIP is ok, then step 3 will next.

  2. Download https://bootstrap.pypa.io/get-pip.py and executes it with next arguments:

    --user , --cache-dir .\local

    Python interpreter will be run with PYTHONUSERBASE=.\local

    local folder will be created near script locations, it is nextcloud/apps/mediadc/lib/Service/python

  3. After that for each Required or Optional package missing in system PIP with install <package_name> argument will be called.

    PYTHONUSERBASE=.\local will be passed to each call, so they will be installed inside that folder.

    Removing that folder is enough to revert auto install process.

    That's all!

Clone this wiki locally