Importing pyplot in a Jupyter Notebook
问题 Running Python 2.7 and trying to get plotting to work the tutorials recommend the below command. from matplotlib import pyplot as plt Works fine when run from the command line python -c "from matplotlib import pyplot as plt" but I get an error when trying to run it inside a Jupyter Notebook. --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-21-1d1446f6fa64> in <module>() ----> 1 from matplotlib import