import matplotlib.pyplot as pl
%matplot inline
def learning_curves(X_train, y_train, X_test, y_test):
\"\"\" Calculates the performance of several models with varyin
You can change the backend used by matplotlib by including:
import matplotlib
matplotlib.use('TkAgg')
before your line 1 import matplotlib.pyplot as pl, as it must be set first. See this answer for more information.
(There are other backend options, but changing backend to TkAgg worked for me when I had a similar problem)