Hi@akhtar,
You need to install a GUI toolkit, so that Matplotlib can display graphics (outside of Jupyter, where the browser handles display). For example, if you install the pyqt package then PyPlot should automatically use the qt5agg backend.
$ pip3 install PyQt5==5.9.2
Hope this will work.
Thank You