%load_ext rpy2.ipython works in iPython but not in iPython Notebook -
i have problem rpy2 running in ipython notebook. if load
%load_ext rpy2.ipython
in ipython 4.0.3 fine. if same thing in ipython notebook get:
--------------------------------------------------------------------------- filenotfounderror traceback (most recent call last) <ipython-input-3-a69f80d0128e> in <module>() ----> 1 get_ipython().magic('load_ext rpy2.ipython') c:\anaconda3\lib\site-packages\ipython\core\interactiveshell.py in magic(self, arg_s) 2334 magic_name, _, magic_arg_s = arg_s.partition(' ') 2335 magic_name = magic_name.lstrip(prefilter.esc_magic) -> 2336 return self.run_line_magic(magic_name, magic_arg_s) 2337 2338 #------------------------------------------------------------------------- c:\anaconda3\lib\site-packages\ipython\core\interactiveshell.py in run_line_magic(self, magic_name, line) 2255 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals 2256 self.builtin_trap: -> 2257 result = fn(*args,**kwargs) 2258 return result 2259 <decorator-gen-65> in load_ext(self, module_str) c:\anaconda3\lib\site-packages\ipython\core\magic.py in <lambda>(f, *a, **k) 191 # it's overkill 1 bit of state. 192 def magic_deco(arg): --> 193 call = lambda f, *a, **k: f(*a, **k) 194 195 if callable(arg): c:\anaconda3\lib\site-packages\ipython\core\magics\extension.py in load_ext(self, module_str) 64 if not module_str: 65 raise usageerror('missing module name.') ---> 66 res = self.shell.extension_manager.load_extension(module_str) 67 68 if res == 'already loaded': c:\anaconda3\lib\site-packages\ipython\core\extensions.py in load_extension(self, module_str) 82 if module_str not in sys.modules: 83 prepended_to_syspath(self.ipython_extension_dir): ---> 84 __import__(module_str) 85 mod = sys.modules[module_str] 86 if self._call_load_ipython_extension(mod): c:\anaconda3\lib\site-packages\rpy2\ipython\__init__.py in <module>() ----> 1 .rmagic import load_ipython_extension c:\anaconda3\lib\site-packages\rpy2\ipython\rmagic.py in <module>() 50 # numpy , rpy2 imports 51 ---> 52 import rpy2.rinterface ri 53 import rpy2.robjects ro 54 import rpy2.robjects.packages rpacks c:\anaconda3\lib\site-packages\rpy2\rinterface\__init__.py in <module>() 72 if not os.path.exists(rlib): 73 continue ---> 74 ctypes.cdll(rlib) 75 _win_ok = true 76 break c:\anaconda3\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error) 345 346 if handle none: --> 347 self._handle = _dlopen(self._name, mode) 348 else: 349 self._handle = handle filenotfounderror: [winerror 161] der angegebene pfadname ist ungültig
is there way both running? rpy2 runs in ipython guess there installation shoiuld correct. thanks, marv
there more differences between environment ipython called , 1 notebook called: error der angegebene pfadname ist ungültig
occurs while trying r shared library.
you'd need tell little more how start either ipython or notebook.
having said, should note rpy2
working better on linux or os x. if ipython notebook primary interest, running through docker container solution.
Comments
Post a Comment