Have found a similar issue, however haven\'t found proper solution.
Here\'s a code:
import matplotlib.pyplot as plt plt.plot([1,2,3],[4,2,5]) plt.sh
In your working directory, check if there is any file matplotlib.py Delete that file and import matplotib again. That should work.