Installing rpy2 for Python 3 using pip

splinter picture splinter · Aug 15, 2016 · Viewed 15k times · Source

I am trying to install the rpy2 package for python 3 on Windows 7. So I simply typed pip install rpy2 in the command line. However, it fails for a reason I do not understand, could anyone clear this up please? It threw back the following in the command line:

    Collecting rpy2
    Using cached rpy2-2.8.2.tar.gz
    Complete output from command python setup.py egg_info:
    Warning: Tried to guess R's HOME but no command <R> in the PATH.
    _______________________________
    Command "python setup.py egg_info" failed with error code 1 in C:\Users\...\AppData\Local\Temp\pip-build-14jn4kdx\rpy2\

Answer

lgautier picture lgautier · Aug 16, 2016

There is no official support of windows.

There exists pre-compiled binaries (see: https://rpy2.github.io/doc/latest/html/overview.html#microsoft-s-windows-precompiled-binaries) but they are for an older release.

At the time of writing using the Linux subsystem available with Windows 10 might be the best options.