Getting black square after merging two rasters in QGIS

Tested on a clean install of the QGIS Standalone Installer Version 3.4, on a 64-bit Windows 10 machine.

QGIS 3.4.3 seems to install a version of the numpy module that is not what gdal_merge needs.

After several attempts, I found this solution:

  • Run as Administrator the OSGeo4W.bat file, located at the QGIS 3.4 folder (C:\Program Files\QGIS 3.4 by default), that calls enviroment variables and opens a shell with administrator privileges

  • run: python -m pip show numpy, returns Version: 1.12.1+mkl

  • run: python -m pip uninstall numpy, agree to proceed, returns Successfully uninstalled numpy-1.12.1+mkl

  • run: python -m pip install numpy, returns Succesfully installed numpy-1.15.4

  • close the shell and run the Merge function in QGIS again, it will work fine now.