ImportError: No module named matplotlib.pyplot

后端 未结 13 982
春和景丽
春和景丽 2020-11-28 02:03

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]         


        
13条回答
  •  佛祖请我去吃肉
    2020-11-28 02:48

    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.

提交回复
热议问题