Use system dependencies
Using system dependencies is a beta feature and may not be entirely stable yet. Please reach out to VIKTOR in case you run into any issues.
In some cases your application uses Python packages that depend on one or multiple packages that cannot be installed using pip
. These system packages need to be installed with the package manager of the operating system. For example
vtk
could be used for processing of images. When you try to publish an app,
you may receive the following error:
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Above error happens because vtk
is using an OpenGL-based program in the background which requires libGL. To annotate
that such system dependencies should be installed when the application is being published, you can specify packages
in your app's viktor.config.toml file:
packages = ["libgl1"]
The provided packages should be apt-get compatible as published VIKTOR apps run on Linux.
Common system packages
The table below provides common use cases for Python package with their required system packages.
Python package | System package(s) | Use case |
---|---|---|
ffmpeg-python | ffmpeg | Video file processing |
opencv-python | python3-opencv | Image processing |
pdf2docx | libgl1 | PDF file processing |
pyenchant | python3-enchant | Spelling check and correction suggestions |
pyomo (GLPK solver) | libglpk-dev, glpk-utils | Formulating, solving, and analyzing optimization models |
pytesseract | tesseract-ocr | Image processing |
python-poppler | poppler-utils, libpoppler-cpp-dev | PDF file processing |
pyvista | libgl1 | High-level API for Visualization Toolkit (VTK) |
vtk | libgl1 | Image processing |
locale | locales-all | Support localization with locales that are not included by default |
Do you have a use case which is not listed in the table above? Please contact support@viktor.ai
or post a message
on the Community Forum and help us improve this overview!