X Tutup
Skip to content

ImportError: No module named 'matplotlib.rcsetup' #8077

@puneethmishra

Description

@puneethmishra

Hi ,

I was able to successfully install Matplotlib on my anaconda installation in Python 3.5 but getting the below error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-d453084f980a> in <module>()
----> 1 get_ipython().magic('matplotlib notebook')
      2 import matplotlib.pyplot as plt

D:\Anaconda3-4\lib\site-packages\IPython\core\interactiveshell.py in magic(self, arg_s)
   2156         magic_name, _, magic_arg_s = arg_s.partition(' ')
   2157         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2158         return self.run_line_magic(magic_name, magic_arg_s)
   2159 
   2160     #-------------------------------------------------------------------------

D:\Anaconda3-4\lib\site-packages\IPython\core\interactiveshell.py in run_line_magic(self, magic_name, line)
   2077                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
   2078             with self.builtin_trap:
-> 2079                 result = fn(*args,**kwargs)
   2080             return result
   2081 

<decorator-gen-105> in matplotlib(self, line)

D:\Anaconda3-4\lib\site-packages\IPython\core\magic.py in <lambda>(f, *a, **k)
    186     # but it's overkill for just that one bit of state.
    187     def magic_deco(arg):
--> 188         call = lambda f, *a, **k: f(*a, **k)
    189 
    190         if callable(arg):

D:\Anaconda3-4\lib\site-packages\IPython\core\magics\pylab.py in matplotlib(self, line)
     98             print("Available matplotlib backends: %s" % backends_list)
     99         else:
--> 100             gui, backend = self.shell.enable_matplotlib(args.gui)
    101             self._show_matplotlib_backend(args.gui, backend)
    102 

D:\Anaconda3-4\lib\site-packages\IPython\core\interactiveshell.py in enable_matplotlib(self, gui)
   2933         """
   2934         from IPython.core import pylabtools as pt
-> 2935         gui, backend = pt.find_gui_and_backend(gui, self.pylab_gui_select)
   2936 
   2937         if gui != 'inline':

D:\Anaconda3-4\lib\site-packages\IPython\core\pylabtools.py in find_gui_and_backend(gui, gui_select)
    257     """
    258 
--> 259     import matplotlib
    260 
    261     if gui and gui != 'auto':

D:\Anaconda3-4\lib\site-packages\matplotlib\__init__.py in <module>()
    122 from matplotlib.cbook import is_string_like, mplDeprecation, dedent, get_label
    123 from matplotlib.compat import subprocess
--> 124 from matplotlib.rcsetup import (defaultParams,
    125                                 validate_backend,
    126                                 cycler)

ImportError: No module named 'matplotlib.rcsetup'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup