Matplotlib won't show

I installed tensorflow-gpu1.15 using terminal command and tensorflow object detection API from source. When I try to run a program as a test, it works fine but matplotlib would throw the error

“Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure”
and it won’t show the figures requested.

I checked and Python-tk is also installed. I tried to reinstall matplotlib, added “matplotlib.use(‘TkAgg’)” in the program but the error persists.

Currently I’m using OpenCV to see the figures, but I will leave this problem here for future.

Are you seeing errors or just warnings?

You have to use matplotlib.pus('tkagg') before you create your first figure (it is safest to do before importing pyplot).

Can you please give use your OS, python version, and Matplotlib version?