Python matplotlib can’t show plot in NON-NixOS

I’m not sure about the nixgl thing there, but I’d try instead:

(python.withPackages(ps: [
    ps.pyserial
    ps.numpy
    ps.matplotlib
]))