'Python cannot importlib.reload module. Raises NotImplementedError

I cannot reload a module in a jupyter notebook. Traceback:

NotImplementedError                       Traceback (most recent call last)
Input In [70], in <cell line: 3>()
      1 import importlib
      2 import exploring_variance
----> 3 importlib.reload(exploring_variance)
      5 str_args = """--threads 6"""
      6 str_args = shlex.split(str_args)

File /usr/local/Cellar/[email protected]/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py:169, in reload(module)
    167 if spec is None:
    168     raise ModuleNotFoundError(f"spec not found for the module {name!r}", name=name)
--> 169 _bootstrap._exec(spec, module)
    170 # The module may have replaced itself in sys.modules!
    171 return sys.modules[name]

File <frozen importlib._bootstrap>:606, in _exec(spec, module)

File <frozen importlib._bootstrap>:550, in _init_module_attrs(spec, module, override)

File <frozen importlib._bootstrap>:390, in cached(self)

NotImplementedError:


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source