Skip to content

Import of matplotlib.pyplot fails on Python 2 #173

@xflr6

Description

@xflr6

After upgrading from 4.3.1 to 4.4.0 under Win7 (same in jupyter notebook):

C:\Users\User>jupyter console
Jupyter console 5.0.0

Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (
MD64)]
Type "copyright", "credits" or "license" for more information.

IPython 5.0.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.



In [1]: import matplotlib.pyplot
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-6f467123fe04> in <module>()

(...)

c:\program files\python27\lib\site-packages\ipykernel\pylab\backend_inline.py in
_enable_matplotlib_integration()
    152     backend = get_backend()
    153     if ip and backend == 'module://%s' % __name__:
--> 154         configure_inline_support(ip, backend)
    155
    156 _enable_matplotlib_integration()

c:\program files\python27\lib\site-packages\IPython\core\pylabtools.pyc in confi
ure_inline_support(shell, backend)
    359     except ImportError:
    360         return
--> 361     from matplotlib import pyplot
    362
    363     cfg = InlineBackend.instance(parent=shell)

ImportError: cannot import name pyplot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions