---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-fb23c6edefe4> in <module>()
----> 1 get_ipython().run_line_magic('load_ext', 'rpy2.ipython')
c:\program files\python\python37\lib\site-packages\IPython\core\interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
2129 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2130 with self.builtin_trap:
-> 2131 result = fn(*args,**kwargs)
2132 return result
2133
<decorator-gen-66> in load_ext(self, module_str)
c:\program files\python\python37\lib\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):
c:\program files\python\python37\lib\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':
c:\program files\python\python37\lib\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. "
c:\program files\python\python37\lib\importlib\__init__.py in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
128
129
c:\program files\python\python37\lib\importlib\_bootstrap.py in _gcd_import(name, package, level)
c:\program files\python\python37\lib\importlib\_bootstrap.py in _find_and_load(name, import_)
c:\program files\python\python37\lib\importlib\_bootstrap.py in _find_and_load_unlocked(name, import_)
c:\program files\python\python37\lib\importlib\_bootstrap.py in _load_unlocked(spec)
c:\program files\python\python37\lib\importlib\_bootstrap_external.py in exec_module(self, module)
c:\program files\python\python37\lib\importlib\_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)
c:\program files\python\python37\lib\site-packages\rpy2\ipython\__init__.py in <module>()
----> 1 from .rmagic import load_ipython_extension
c:\program files\python\python37\lib\site-packages\rpy2\ipython\rmagic.py in <module>()
83 template_converter += numpy2ri.converter
84 if pandas:
---> 85 from rpy2.robjects import pandas2ri
86 template_converter += pandas2ri.converter
87
c:\program files\python\python37\lib\site-packages\rpy2\robjects\pandas2ri.py in <module>()
21 import numpy
22 import pytz
---> 23 import tzlocal
24 import warnings
25
ModuleNotFoundError: No module named 'tzlocal'