Context
I am trying to make the OTB installation available to all users of our Debian 12 server, so they can use it in QGIS with the plugin.
Configuration setup
My system: Debian 12
Version of the OTB: 9.1.0
I installed the OTB with: the .tar archives
If relevant, you may also provide:
QGIS version: 3.38
Python version: 3.10/3.11
Description of my issue
Hello everybody!
I am an administrator for our Linux servers where we try to make available for all our scientists different tools and software for use in their research. Among other software, we use QGIS for analyses of geographic data.
Some of our scientists regularly ask me for installation of different plugins to QGIS, so much that it would make sense for some of these tools to be made available generally, because several people want to use them in QGIS. OTB is one of these plugins.
So, I tried to make the OTB available for all users by installing it as root to /opt/OTB
using the advanced installation guide here: Installation — Orfeo ToolBox 9.1.0 documentation with /opt/OTB
as the install path.
Then I log in as a regular user and try to set the OTB paths in QGIS as described in the CookBook.
i.e.
OTB folder = /opt/OTB
and
OTB application folder = = /opt/OTB/lib/otb/applications
But this does not add any OTB entries to my Processing Toolbox. There are no error messages shown in the QGIS GUI and also not under /tmp/QGIS-xyz
where QGIS seems to put its log files.
If I do the exact same installation as a regular user into my home folder instead of /opt
everything works: The OTB entries get added to the Processing Toolbox as soon as I click “OK” after setting the folders in QGIS → Options → Processing → Providers → OTB.
It sounds like a permission issue to me? Are there any special permissions that I have to set on the /opt/OTB
folder in order for all users to be able to access it from QGIS? It currently is owned by root and has the permissions 755, so all users should be able to read and execute inside the folder but not write there.
It would be very convenient if OTB could be accessed from /opt
for all users instead of several users installing it to their home folders individually. Is this generally possible and I only have my permissions wrong?
Side issue:
During the installation, I also ran into the problem that the GDAL Python bindings for OTB 9.1 at Index of /packages/archives/OTB are only available for Python versions 3.10 and 3.12 but not 3.11, which is the default in Debian 12.
Therefore, when running the last step of the Advanced installation method:
source /Path/To/Install/OTB/otbenv.profile
the script failed to download anything since line 44 of the /Path/To/Install/OTB/tools/post_install.sh
script tried to download OTB-9.1-GDAL-bindings-py311.tar.gz
which does not exist on the server.
I fixed this by changing line 44 to download OTB-9.1-GDAL-bindings-py310.tar.gz
regardless of the detected Python version. This seems to work for the installation but may bring problems when actually using the Toolbox, I guess? Is there any recommended way to install the GDAL bindings for OTB 9.1 on a system using Python 3.11? Or is it okay to use the bindings for 3.10 in this case?
Thanks in advance for any answers!