Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%matplotlib widget fails with pip install #71

Closed
michaelaye opened this issue Nov 16, 2018 · 2 comments
Closed

%matplotlib widget fails with pip install #71

michaelaye opened this issue Nov 16, 2018 · 2 comments

Comments

@michaelaye
Copy link

Using ipympl 0.2.1 in a py37 env:

$ pip list |grep ipympl                                                                           (py37)
ipympl                            0.2.1

I get this after calling %matplotlib widget:

 ModuleNotFoundError: No module named 'ipympl.backend_nbagg' 
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-9-7b899824b39e> in <module>
----> 1 get_ipython().run_line_magic('matplotlib', 'widget')

~/miniconda3/envs/py37/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
   2285                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
   2286             with self.builtin_trap:
-> 2287                 result = fn(*args,**kwargs)
   2288             return result
   2289 

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

~/miniconda3/envs/py37/lib/python3.7/site-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
    185     # but it's overkill for just that one bit of state.
    186     def magic_deco(arg):
--> 187         call = lambda f, *a, **k: f(*a, **k)
    188 
    189         if callable(arg):

~/miniconda3/envs/py37/lib/python3.7/site-packages/IPython/core/magics/pylab.py in matplotlib(self, line)
     97             print("Available matplotlib backends: %s" % backends_list)
     98         else:
---> 99             gui, backend = self.shell.enable_matplotlib(args.gui)
    100             self._show_matplotlib_backend(args.gui, backend)
    101 

~/miniconda3/envs/py37/lib/python3.7/site-packages/IPython/core/interactiveshell.py in enable_matplotlib(self, gui)
   3353                 gui, backend = pt.find_gui_and_backend(self.pylab_gui_select)
   3354 
-> 3355         pt.activate_matplotlib(backend)
   3356         pt.configure_inline_support(self, backend)
   3357 

~/miniconda3/envs/py37/lib/python3.7/site-packages/IPython/core/pylabtools.py in activate_matplotlib(backend)
    312 
    313     import matplotlib.pyplot
--> 314     matplotlib.pyplot.switch_backend(backend)
    315 
    316     # This must be imported last in the matplotlib series, after

~/miniconda3/envs/py37/lib/python3.7/site-packages/matplotlib/pyplot.py in switch_backend(newbackend)
    205         else "matplotlib.backends.backend_{}".format(newbackend.lower()))
    206 
--> 207     backend_mod = importlib.import_module(backend_name)
    208     Backend = type(
    209         "Backend", (matplotlib.backends._Backend,), vars(backend_mod))

~/miniconda3/envs/py37/lib/python3.7/importlib/__init__.py in import_module(name, package)
    125                 break
    126             level += 1
--> 127     return _bootstrap._gcd_import(name[level:], package, level)
    128 
    129 

~/miniconda3/envs/py37/lib/python3.7/importlib/_bootstrap.py in _gcd_import(name, package, level)

~/miniconda3/envs/py37/lib/python3.7/importlib/_bootstrap.py in _find_and_load(name, import_)

~/miniconda3/envs/py37/lib/python3.7/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

ModuleNotFoundError: No module named 'ipympl.backend_nbagg'
@michaelaye
Copy link
Author

These are my MPL packages:

$ conda list matplotlib                                                                           (py37)
# packages in environment at /Users/klay6683/miniconda3/envs/py37:
#
# Name                    Version                   Build  Channel
matplotlib                3.0.2                    py37_1    conda-forge
matplotlib-base           3.0.2            py37hb2d221d_1    conda-forge
klay6683@MacL3883|~/D/s/pyciss (master↑12|✚6…)

@michaelaye
Copy link
Author

seems it was a pip/conda install mishap... sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant