rstudi matplotlib crash qt

library(reticulate)
matplotlib <- import("matplotlib")
matplotlib$use("tkAgg")
plt <- reticulate::import("matplotlib.pyplot")
plt$hist(1:100)
Pleasant Platypus