rpy2 install on windows 7

前端 未结 9 904
轮回少年
轮回少年 2020-11-27 02:50

I\'m trying to install rpy2 on my computer, but I wasn\'t able to do it.

I downloaded the source package and I tryed to install Rpy2 (rpy2-2.3.2) using the command <

9条回答
  •  爱一瞬间的悲伤
    2020-11-27 03:10

    I just successfully installed rpy2 on Windows 8.1 64bit with the binary installer from http://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2. It is usually much easier to just download a binary instead of trying to compile a package in Windows.

    Also, you should set R_HOME environmental variable (in my case, to C:\Program Files\R\R-3.1.1) before you install the rpy2 binary. Otherwise you get RuntimeError: R_HOME not defined. error when you try to import rpy2. (thanks to R_HOME Error with rpy2)

    Lastly, make sure to use %load_ext rpy2.ipython instead of %load_ext rmagic if you want to use it in IPython. It is one of the new features in rpy2 version 2.4.0.

    (thanks to IPython notebook and rmagic/rpy2: cannot find module ri2py (OSX 10.8.5, python 2.7, R 3.1))

提交回复
热议问题