1

I recently installed QGIS, the 3.10.x A Coruña LTR version following those instructions. I'm running it on Linux Ubuntu 18.04 Bionic Beaver.

GDAL functions (notably in the plugin Processing), like sieve, merge, polygonize... couldn't be used as I got this error each time in the Log (here for the sieve function):

QGIS version: 3.10.4-A Coruña
QGIS code revision: 10bc9f2ff2
Qt version: 5.9.5
GDAL version: 2.2.3
GEOS version: 3.7.1-CAPI-1.11.1 27a5e771
PROJ version: 493
Processing algorithm…
Algorithm 'Sieve' starting…
Input parameters:
{ 'EIGHT_CONNECTEDNESS' : False, 'EXTRA' : '', 'INPUT' : '/home/usr/Desktop/folder/qgis/QGIS-Training-Data-2.0/exercise_data/raster_analysis/all_conditions.tif', 'MASK_LAYER' : None, 'NO_MASK' : False, 'OUTPUT' : 'TEMPORARY_OUTPUT', 'THRESHOLD' : 10 }

GDAL command:
gdal_sieve.py -st 10 -4 -of GTiff /home/usr/Desktop/folder/qgis/QGIS-Training-Data-2.0/exercise_data/raster_analysis/all_conditions.tif /tmp/processing_454f018dd02843ff825e6f2494820e75/e60f78775c294aafb296c078daaf2f48/OUTPUT.tif
GDAL command output:
/bin/sh: 1: gdal_sieve.py: not found

Execution completed in 0.08 seconds
Results:
{'OUTPUT': '/tmp/processing_454f018dd02843ff825e6f2494820e75/e60f78775c294aafb296c078daaf2f48/OUTPUT.tif'}

Loading resulting layers
The following layers were not correctly generated.<ul><li>/tmp/processing_454f018dd02843ff825e6f2494820e75/e60f78775c294aafb296c078daaf2f48/OUTPUT.tif</li></ul>You can check the 'Log Messages Panel' in QGIS main window to find more information about the execution of the algorithm.

So, I focused on the /bin/sh: 1: gdal_sieve.py: not found line to try to solve this problem.

  1. I can't find any way to retrieve these functions from the QGIS UI;
  2. I tried installing the libgdal package from the terminal, but it removes essential packages of QGIS. I had to downgrade the GDAL packages in order to reinstall QGIS...;
  3. I managed to find the missing python scripts and tried to a) adding a new folder path in the folder scripts option to the folder containing the scripts b) adding directly .py scripts to the already existing folder (path: /home/usr/.local/share/QGIS/QGIS3/profiles/default/python).

Both attempts 3. a) and b) made QGIS crash and deactivate the Processing plugin when the software was rebooted.

Are those information sufficient to tell what I'm doing wrong and how I could get those functions?

2
  • Did you install gdal-python?
    – Ian Turton
    Apr 14, 2020 at 14:40
  • Through pip3 ? Thanks for the answer.
    – Gorodetska
    Apr 16, 2020 at 14:50

1 Answer 1

0

I've had the same problem and installing python-gdal, as suggested by Ian Turton in the comments, helped. You don't need pip, just use apt-get:

sudo apt-get install python-gdal

Even if it was installed automatically previously (you can check by running apt list python-gdal), reinstalling it manually may help.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.