Today I've been messing around with QGIS installations and I think I've accidentally caused a problem: QGIS is no longer able to execute the GDAL raster tool 'Fill no data' and other GDAL tools that use Python.
I am using Windows 10 and installed QGIS 3.10.1 from www.qgis.org using the standalone QGIS version. Later, I uninstalled that installation from my pc, and installed QGIS and GDAL and GRASS GIS using the OSGeo4W Network installer (also through www.qgis.org). Then I couldn't figure out how to remove the OSGeo4W installation, so I just deleted the folder 'OSGeo4W' on my C:\ drive. And then I installed the standalone QGIS version again.
At this point, whenever I try to execute the GDAL tool 'Fill no data' on a raster layer in QGIS, I get the following error. Other GDAL tools that use Python generate the same error.
2019-12-11T17:20:16 INFO python3 -m gdal_fillnodata -md 10 -b 1 -of GTiff C:/Users/username/Downloads/ahn_ruw/M_32GZ2.TIF C:/Users/username/Downloads/ahn_fill/test.tif
2019-12-11T17:20:16 INFO GDAL execution console output
C:\PROGRA~1\QGIS3~1.10\bin\python3.exe: No module named gdal_fillnodata
What I think is happening is that my current QGIS installation is looking for a non-existent Python/GDAL installation in the old OSGeo4W folder. Or some other confusing with different installations of Python/GDAL. I think it is a Python problem.
I have tried this but that didn't work. I've also tried changing the system variable PATH in QGIS under Settings > System to the folder C:\Program Files\QGIS 3.10\apps\Python37 but that didn't work. It seems that the correct path (C:\Program Files\QGIS 3.10\apps\Python37) is already in the system variable PATH.
Does somebody know how to fix this?