Install rpy2 - USEPA/useeiopy GitHub Wiki
Python package for running the R interpreter from within python
To install rpy2 on Windows, one can follow these steps
- Go to Unofficial Windows Binaries for Python Extension Packages
- Download an appropriate whl file, paying attention to python version (3.4 through 3.7) and bit (32 or 64). Tested with Python 3.7.6 x64
- Open a command prompt and navigate to the whl file location (downloads).
- Switch to the python virtual environment if using one [ workon venv_name ]
- Install the whl [ pip install rpy2-2.9.5-etc.whl ]
- You must set environmental variables for R_USER and R_HOME in the computer registry. See this StackOverflow discussion for help. How to setup environment variable R_user to use rpy2 in python