Grdimage function not working

I’ve built the Pygmt with gdal and according to the api that should allow the grdimage function to have an image file path that should show up with a generated visualization. However, this isn’t working. If anyone has ideas can you please let me know? Thanks.

Can you please post the code that is not working, any error messages that you receive, and the results from the following command?

import pygmt
pygmt.show_versions()

Hello. Thanks for the help. I think after a second evaluation, GDAL wasn’t actually installed properly. I’m trying to install it on my ubuntu, but am unable to do so. These are the commands that I’m trying to run based on what was in this link:
https://mothergeo-py.readthedocs.io/en/latest/development/how-to/gdal-ubuntu-pkg.html
and based on dependencies it said I was missing everytime I ran a dockerfile which had the setupd commands:

RUN add-apt-repository ppa:ubuntugis/ppa && apt-get update
RUN apt-get update
RUN apt-get install -y gdal-bin
RUN apt-get update

RUN apt-get install -y --allow-downgrades libssl1.1=1.1.1-1ubuntu2.1~18.04.9
RUN apt-get install -y libssl-dev
RUN apt-get install -y libmysqlclient-dev
RUN apt-get install -y libgdal-dev
RUN export CPLUS_INCLUDE_PATH=/usr/include/gdal
RUN export C_INCLUDE_PATH=/usr/include/gdal
RUN pip3 install GDAL

When I run this it says the last command returned a non-zero code of 1. Is there some kind of a version issue leading to this? Possibly with the RUN apt-get install -y --allow-downgrades libssl1.1=1.1.1-1ubuntu2.1~18.04.9 line that downgraded the libssl1.1 package?