Advertisement
prefrontalvortex

Import matplotlib.pyplot in jupyter

Aug 8th, 2016
512
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.74 KB | None | 0 0
  1. In [3]: from matplotlib import pyplot as plt
  2.  
  3. ---------------------------------------------------------------------------
  4. ImportError                               Traceback (most recent call last)
  5. <ipython-input-3-329566526ef3> in <module>()
  6. ----> 1 from matplotlib import pyplot as plt
  7.       2
  8.       3 # import matplotlib.pylab
  9.  
  10. /usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py in <module>()
  11.     112
  12.     113 from matplotlib.backends import pylab_setup
  13. --> 114 _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  14.     115
  15.     116 _IP_REGISTERED = None
  16.  
  17. /usr/local/lib/python2.7/dist-packages/matplotlib/backends/__init__.pyc in pylab_setup()
  18.      30     # imports. 0 means only perform absolute imports.
  19.      31     backend_mod = __import__(backend_name,
  20. ---> 32                              globals(),locals(),[backend_name],0)
  21.      33
  22.      34     # Things we pull in from all backends
  23.  
  24. /usr/local/lib/python2.7/dist-packages/ipykernel/pylab/backend_inline.py in <module>()
  25.     154         configure_inline_support(ip, backend)
  26.     155
  27. --> 156 _enable_matplotlib_integration()
  28.  
  29. /usr/local/lib/python2.7/dist-packages/ipykernel/pylab/backend_inline.py in _enable_matplotlib_integration()
  30.     152     backend = get_backend()
  31.     153     if ip and backend == 'module://%s' % __name__:
  32. --> 154         configure_inline_support(ip, backend)
  33.     155
  34.     156 _enable_matplotlib_integration()
  35.  
  36. /usr/local/lib/python2.7/dist-packages/IPython/core/pylabtools.pyc in configure_inline_support(shell, backend)
  37.     359     except ImportError:
  38.     360         return
  39. --> 361     from matplotlib import pyplot
  40.     362
  41.     363     cfg = InlineBackend.instance(parent=shell)
  42.  
  43. ImportError: cannot import name pyplot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement