ImportError: No module named matplotlib.pyplot

后端 未结 13 986
春和景丽
春和景丽 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 03:05

    If you are using Python 2, just run

    sudo apt-get install python-matplotlib
    

    The best way to get matplotlib is :

    pip install matplotlib
    

    cause the previous way may give you a old version of matplotlib

提交回复
热议问题