%load_ext tikzmagic results in ModuleNotFoundError: No module named 'tikzmagic'

205 views
Skip to first unread message

Christoph Kukulies

unread,
Nov 15, 2018, 7:19:42 AM11/15/18
to Project Jupyter
I'm trying to use tikzmagic in a Jupyter notebook (Python 3.6.6) to no avail.
.

Whenever I put the line

%load_ext tikzmagic

in my Jupyter notebook, I'm getting:


---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-8-6190f3e198eb> in <module>()
      2 import math as m
      3 import matplotlib.pyplot as plt
----> 4 get_ipython().magic('load_ext tikzmagic')
      5 get_ipython().magic('matplotlib inline')
      6 U=280.

~/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py in magic(self, arg_s)
   2144         magic_name, _, magic_arg_s = arg_s.partition(' ')
   2145         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2146         return self.run_line_magic(magic_name, magic_arg_s)
   2147 
   2148     #-------------------------------------------------------------------------

~/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line)
   2065                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
   2066             with self.builtin_trap:
-> 2067                 result = fn(*args,**kwargs)
   2068             return result
   2069 

<decorator-gen-65> in load_ext(self, module_str)

~/anaconda3/lib/python3.6/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):

~/anaconda3/lib/python3.6/site-packages/IPython/core/magics/extension.py in load_ext(self, module_str)
     31         if not module_str:
     32             raise UsageError('Missing module name.')
---> 33         res = self.shell.extension_manager.load_extension(module_str)
     34 
     35         if res == 'already loaded':

~/anaconda3/lib/python3.6/site-packages/IPython/core/extensions.py in load_extension(self, module_str)
     83             if module_str not in sys.modules:
     84                 with prepended_to_syspath(self.ipython_extension_dir):
---> 85                     mod = import_module(module_str)
     86                     if mod.__file__.startswith(self.ipython_extension_dir):
     87                         print(("Loading extensions from {dir} is deprecated. "

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

~/anaconda3/lib/python3.6/importlib/_bootstrap.py in _gcd_import(name, package, level)

~/anaconda3/lib/python3.6/importlib/_bootstrap.py in _find_and_load(name, import_)

~/anaconda3/lib/python3.6/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

ModuleNotFoundError: No module named 'tikzmagic'

Any clues?

--
Christoph

Reply all
Reply to author
Forward
0 new messages