While attempting to use matplotlib.pyplot with the latest version of matplotlib (updated through the Anaconda distribution) I got a very similar error. The error appears to be between the root python version and the Anaconda distribution as the following solves the problem: