rpy2 import is not working

后端 未结 8 1175
逝去的感伤
逝去的感伤 2021-02-14 16:16

I get an error when I try to import rpy2. Here is the code and error.

>>> import pandas.rpy.common
Traceback (most recent call last):  

File \"C:\\PF\         


        
8条回答
  •  眼角桃花
    2021-02-14 16:33

    Well, first you have to install rpy2. If you are using conda you can do it using the following command

    conda install -c r rpy2 
    

    Then, if you want to use R on Jupyter Notebook environment you can activate R using

    %load_ext rpy2.ipython
    

提交回复
热议问题