ModuleNotFoundError: No module named ‘tkinter’
solver
#%%
import matplotlib
ubuntu
sudo apt install python3-tk
or
# don't show so we should save the image
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
....
plt.savefig(path)