install.packages("PythonInR", repos="http://R-Forge.R-project.org")

Dependencies

Python >= 2.7.0 R >= 2.15.0

R-packages:
- pack

Linux

Python headers

On Debian and Debian-based Linux distributions (including Ubuntu and other derivatives) the “Python Development Headers” can be installed by typing the following into the terminal.

    apt-get install python-dev

For installation on Red Hat Enterprise Linux , Fedora, and other Red Hat Linux-based distributions, use the following:

    yum install python-devel

Windows

There are no additional dependencies on Windows. (One obviously needs to have R and Python installed.)

Windows Setup

Since the Windows version of PythonInR uses explicit linkage one can switch between different Python versions without recompiling the package. This flexibility comes at the price of additional configuration at the startup. Which results in a different behavior for the static (Linux default) and the explicit linked (Windows default) version. Where as the static linked version automatically connects, when the package get’s loaded, the explicitly linked version needs to be connected manually.

To enable automatic connection for the explicitly linked version the environment variable PYTHON_EXE has to be set. You can put your Python path into your .Renviron or .Rprofile file (Setting up a .Renviron file).