I am currently practicing matplotlib. This is the first example I practice.
#!/usr/bin/python
import matplotlib.pyplot as plt
radius = [1.0, 2.0, 3.0, 4.0]
Comment in the normal feed are blocked. Let me write why this happens, just like when you executed your app.
If you ran scripts, python or ipython in another environment than the one you installed it, you will get these issues.
Don't confuse reinstalling it. Matplotlib is normally installed in your user environment, not in sudo. You are changing the environment.
So don't reinstall pip, just make sure you are running it as sudo if you installed it in the sudo environment.