rpy2 3.6.4


pip install rpy2

  Latest version

Released: Sep 26, 2025


Meta
Author: Laurent Gautier
Requires Python: >=3.8

Classifiers

Programming Language
  • Python
  • Python :: 3
  • Python :: 3.8
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13

Intended Audience
  • Developers
  • Science/Research

Python -> R bridge

pypi Codecov GH Actions

PyPI - Downloads Conda Downloads

The project's webpage is here: https://rpy2.github.io/

Installation

Released versions can be installed from a package repository (default being pypi) using pip:

pip install rpy2

The package has optional depencies providing specific functionalities not otherwise required to use the rest of rpy2.

For example, to be able to run the unit tests:

pip install 'rpy2[test]'

To install all optional dependencies (numpy, pandas, ipython), use:

pip install 'rpy2[all]'

Installation for rpy2 developers

If a developer, the package can be installed from its source tree. rpy2 is a namespace package with its consituting parts in different "sub-packages".

To install from the source tree, just enter:

pip install ./rpy2-rinterface/ ./rpy2-robjects/ .

Various optional dependencies can be specified through dependency groups. For example:

pip install ./rpy2-rinterface'[all]' ./rpy2-robjects'[all]' '.[all]'

rpy2-rinterface contains the binding to R's C API. Building from source require a compilation toolchain / developper tools installed, and you will have to figure out how to have them installed on your system by yourself. The CI pipeline builds binary wheels for Linux, MacOS, and Windows. Watching how things are set up there is pretty much all documentation from the package maintainers on the matter.

Issues loading shared C libraries

Whenever R is in not installed in a system location, the system might not know where to find the R shared library.

If R is in the PATH, that is entering R on the command line successfully starts an R terminal, but rpy2 does not work because of missing C libraries, try the following before starting Python:

export LD_LIBRARY_PATH="$(python -m rpy2.situation LD_LIBRARY_PATH)":${LD_LIBRARY_PATH}

Documentation

Documentation is available either in the source tree (doc/), or online.

Testing

rpy2 uses pytest, with the plugin pytest-cov for code coverage. To test the package from the source tree, either to check and installation on your system or before submitting a pull request, do:

pytest rpy2-rinterface/ rpy2-robjects/

For code coverage, do:

pytest --cov=rpy2.rinterface_lib \
       --cov=rpy2.rinterface \
       --cov=rpy2.ipython \
       --cov=rpy2.robject \
       rpy2-rinterface/ rpy2-robjects/

For more options, such as how to run specify tests, please refer to the pytest documentation.

License

RPy2 can be used under the terms of the GNU General Public License Version 2 or later (see the file gpl-2.0.txt). This is the very same license R itself is released under.

3.6.4 Sep 26, 2025
3.6.3 Sep 04, 2025
3.6.2 Aug 02, 2025
3.6.1 Jun 08, 2025
3.6.0 May 25, 2025
3.6.0a2 May 05, 2025
3.6.0.dev2 Dec 29, 2024
3.6.0.dev1 Dec 28, 2024
3.5.17 Nov 28, 2024
3.5.16 Mar 31, 2024
3.5.15 Dec 28, 2023
3.5.14 Sep 01, 2023
3.5.13 Jun 26, 2023
3.5.12 May 20, 2023
3.5.11 Apr 16, 2023
3.5.10 Mar 06, 2023
3.5.9 Feb 24, 2023
3.5.8 Feb 06, 2023
3.5.7 Jan 07, 2023
3.5.6 Nov 12, 2022
3.5.5 Oct 10, 2022
3.5.4 Aug 21, 2022
3.5.3 Jul 23, 2022
3.5.2 May 21, 2022
3.5.1 Apr 09, 2022
3.5.0 Apr 03, 2022
3.4.5 Jun 04, 2021
3.4.4 Apr 18, 2021
3.4.3 Mar 21, 2021
3.4.2 Jan 10, 2021
3.4.1 Jan 03, 2021
3.4.0 Jan 02, 2021
3.3.6 Oct 02, 2020
3.3.5 Jul 08, 2020
3.3.4 Jun 21, 2020
3.3.3 May 18, 2020
3.3.2 Apr 20, 2020
3.3.1 Apr 14, 2020
3.3.0 Apr 12, 2020
3.2.7 Mar 22, 2020
3.2.6 Feb 02, 2020
3.2.5 Jan 26, 2020
3.2.4 Dec 15, 2019
3.2.3 Dec 14, 2019
3.2.2 Nov 03, 2019
3.2.1 Oct 22, 2019
3.2.0 Sep 28, 2019
3.1.0 Sep 01, 2019
3.0.5 Jul 14, 2019
3.0.4 May 14, 2019
3.0.3 May 06, 2019
3.0.2 Apr 20, 2019
3.0.1 Mar 01, 2019
3.0.0 Feb 24, 2019
2.9.6b0 Feb 23, 2019
2.9.5 Nov 27, 2018
2.9.4 Jun 25, 2018
2.9.3 Apr 14, 2018
2.9.2 Jan 15, 2018
2.9.1 Nov 04, 2017
2.9.0 Aug 19, 2017
2.8.6 May 29, 2017
2.8.5 Dec 21, 2016
2.8.4 Nov 17, 2016
2.8.3 Sep 04, 2016
2.8.2 Jul 10, 2016
2.8.1 Jun 14, 2016
2.8.0 May 21, 2016
2.7.9 May 07, 2016
2.7.8 Feb 03, 2016
2.7.7 Jan 17, 2016
2.7.6 Dec 28, 2015
2.7.5 Dec 11, 2015
2.7.4 Nov 08, 2015
2.7.3 Nov 01, 2015
2.7.2 Oct 18, 2015
2.7.1 Oct 11, 2015
2.7.0 Sep 12, 2015
2.6.3 Sep 04, 2015
2.6.2 Aug 14, 2015
2.6.1 Jul 16, 2015
2.6.1.dev0 Jul 16, 2015
2.6.0 Jun 08, 2015
2.5.6 Feb 10, 2015
2.5.5 Feb 01, 2015
2.5.4 Dec 18, 2014
2.5.3 Dec 12, 2014
2.5.2 Nov 21, 2014
2.5.1 Nov 12, 2014
2.5.0 Nov 02, 2014
2.4.4 Oct 05, 2014
2.4.3 Aug 14, 2014
2.4.2 Jun 15, 2014
2.4.1 Jun 07, 2014
2.4.0 May 25, 2014
2.3.10 Apr 11, 2014
2.3.9 Jan 26, 2014
2.3.8 Sep 28, 2013
2.3.7 Sep 04, 2013
2.3.6 Apr 28, 2013
2.3.5 Apr 04, 2013
2.3.4 Mar 16, 2013
2.3.3 Mar 02, 2013
2.3.2 Feb 05, 2013
2.3.1 Dec 11, 2012
2.3.0 Dec 10, 2012
2.3.0b1 Oct 28, 2012
2.3.0a1 Oct 21, 2012
2.2.7 Oct 20, 2012
2.2.6 Apr 21, 2012
2.2.5 Dec 27, 2011
2.2.4 Oct 01, 2011
2.2.3 Sep 25, 2011
2.2.2 Jul 25, 2011
2.2.1 Jun 10, 2011
2.2.0 Jun 05, 2011
2.1.9 Nov 27, 2010
2.1.8 Nov 09, 2010
2.1.7 Oct 13, 2010
2.1.6 Oct 11, 2010
2.1.5 Sep 27, 2010
2.1.4 Aug 01, 2010
2.1.3 May 28, 2010
2.1.2 May 23, 2010
2.1.1 Apr 28, 2010
2.1.0 Apr 22, 2010
2.0.8 Nov 06, 2009
2.0.8.win32 Nov 09, 2009

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
rpy2-rinterface (>=3.6.3)
rpy2-robjects (>=3.6.3)
packaging
backports.zoneinfo