1

私は現在condaを使用しており、ipythonをセットアップしていますが、私が直面している問題はrmagicを使用できないことです

[3]:

%load_ext rmagic
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-3-67efefd52de2> in <module>()
----> 1 get_ipython().magic(u'load_ext rmagic')

lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
   2170         magic_name, _, magic_arg_s = arg_s.partition(' ')
   2171         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2172         return self.run_line_magic(magic_name, magic_arg_s)
   2173 
   2174     #-------------------------------------------------------------------------
lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
   2091                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
   2092             with self.builtin_trap:
-> 2093                 result = fn(*args,**kwargs)
   2094             return result
   2095 

lib/python2.7/site-packages/IPython/core/magics/extension.pyc in load_ext(self, module_str)

/lib/python2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
    189     # but it's overkill for just that one bit of state.
    190     def magic_deco(arg):
--> 191         call = lambda f, *a, **k: f(*a, **k)
    192 
    193         if callable(arg):

/lib/python2.7/site-packages/IPython/core/magics/extension.pyc in load_ext(self, module_str)
     60         if not module_str:
     61             raise UsageError('Missing module name.')
---> 62         res = self.shell.extension_manager.load_extension(module_str)
     63 
     64         if res == 'already loaded':

/lib/python2.7/site-packages/IPython/core/extensions.pyc in load_extension(self, module_str)
     96             if module_str not in sys.modules:
     97                 with prepended_to_syspath(self.ipython_extension_dir):
---> 98                     __import__(module_str)
     99             mod = sys.modules[module_str]
    100             if self._call_load_ipython_extension(mod):

/lib/python2.7/site-packages/IPython/extensions/rmagic.py in <module>()
     44 import numpy as np
     45 
---> 46 import rpy2.rinterface as ri
     47 import rpy2.robjects as ro
     48 try:

ImportError: No module named rpy2.rinterface

Conda を使用すると、作業を減らす必要があると思いましたが、間違っているように見えますか? これを機能させるために何か追加する必要がありますか?

4

0 に答える 0