mkrphys / ipython-tikzmagic

IPython magics for generating figures with TikZ
BSD 3-Clause "New" or "Revised" License
159 stars 43 forks source link

ModuleNotFoundError in Python 3.8 #33

Closed sbenthall closed 3 years ago

sbenthall commented 3 years ago

tikzmagic was working normally in my Python 3.7 environment but does not seem to be working in 3.8 after standard installation. Is 3.8 supported?

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-997c417649e4> in <module>
----> 1 get_ipython().run_line_magic('load_ext', 'tikzmagic')

~/.local/lib/python3.8/site-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
   2334                 kwargs['local_ns'] = self.get_local_scope(stack_depth)
   2335             with self.builtin_trap:
-> 2336                 result = fn(*args, **kwargs)
   2337             return result
   2338 

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

~/.local/lib/python3.8/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):

~/.local/lib/python3.8/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':

~/.local/lib/python3.8/site-packages/IPython/core/extensions.py in load_extension(self, module_str)
     78             if module_str not in sys.modules:
     79                 with prepended_to_syspath(self.ipython_extension_dir):
---> 80                     mod = import_module(module_str)
     81                     if mod.__file__.startswith(self.ipython_extension_dir):
     82                         print(("Loading extensions from {dir} is deprecated. "

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

/usr/lib/python3.8/importlib/_bootstrap.py in _gcd_import(name, package, level)

/usr/lib/python3.8/importlib/_bootstrap.py in _find_and_load(name, import_)

/usr/lib/python3.8/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

ModuleNotFoundError: No module named 'tikzmagic'
sbenthall commented 3 years ago

nevermind this was due to a stupid pip versioning issue