I just used PyInstaller for the first time to package a little script that uses a Tkinter interface for user inputs and Matplotlib for plotting some maps.
It was successfully packaged and starts up fine (Tkinter interface in particular works nominally) but once the Matplotlib plot command is called, I get this error in the console:
plotter.py:115: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
I assume it has something to do with my import statements. I’m plotting through xarray, which uses matplotlib. The plot call is pretty vanilla, but included below along with the imports.
import xarray as xr
import matplotlib.pyplot as plt
from tkinter import messagebox, ttk, filedialog
import tkinter as tk
levels=[-20000, cutoff_depth, 0, 5000],