I am having difficulties importing
import matplotlib.pyplot as plt
import matplotlib as mpl
line 58, in <module>
cursors.MOVE : Gdk.Cursor.new(Gdk.CursorType.FLEUR),
TypeError: constructor returned NULL
You are failing to load GTK. Most likely, it is because you do not have access to an X11 server and can't draw windows (which is what GTK does).
matplotlib.use("Pdf") before importing
pyplot. Then you won't need to load GTK and it won't fail. You can still make plots and save them to pdf but you can't draw them on screen.
Alternatively, you could try forwarding X11. Then you could see the windows as if you were on the host machine. With a Linux client, this is done by logging on via
ssh -X hostname. With a Windows client, it can be done but not as smoothly.