ipython与conda遇到rmagic问题

时间:2013-11-12 23:58:44

标签: r ipython conda

我目前正在使用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

我认为和康达一样,我们必须做更少的工作,但看起来我错了?我是否还需要做任何其他事情来使其发挥作用?

0 个答案:

没有答案