Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Python -> R bridge

pypi PyPI Downloads Codecov GH Actions

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 with:

pip install .

Optional dependencies can be specified similarly. For example:

pip install '.[all]'

The package is known to compile on Linux, MacOSX (provided that developper tools are installed, and you are ready figure out how by yourself). The situation is currently a little more complicated on Windows. Check the issue tracker.

In case you find yourself with this source without any idea of what it takes to compile anything on your platform, try first

python setup.py install

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 tests/

For code coverage, do:

pytest --cov=rpy2.rinterface_lib \
       --cov=rpy2.rinterface \
       --cov=rpy2.ipython \
       --cov=rpy2.robject \
       tests

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.

Metadata

Release files for rpy2 3.6.0.dev2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rpy2 3.6.0.dev2
File Size Uploaded Provenance Actions
rpy2-3.6.0.dev2.tar.gz 51.5 kB Without provenance Details for rpy2-3.6.0.dev2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rpy2 3.6.0.dev2
File Interpreter ABI Platform Actions
rpy2-3.6.0.dev2-py3-none-any.whl Python 3 none any Details for rpy2-3.6.0.dev2-py3-none-any.whl

Total release size: 61.9 kB

Release files / rpy2-3.6.0.dev2.tar.gz

Download URL rpy2-3.6.0.dev2.tar.gz
Size 51.5 kB
Tags Source
SHA-256 checksum
How to use checksums
57e0fad4ee1eab3b484b018528043ebb8965790edb80be0a884bdb0f2512fe83
BLAKE2b-256 checksum
How to use checksums
273b1b4154afc42de40ca90b8776114908afd3fe1a5983f28bfb206deaf9b451
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / rpy2-3.6.0.dev2-py3-none-any.whl

Download URL rpy2-3.6.0.dev2-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aac2a18bfb6a30fd766cbd8139d236e5cd1c82d26128690ca30c56ce271907b5
BLAKE2b-256 checksum
How to use checksums
49367156fb8d3afc18c9f14c09df6032d95fecc18659812537766306422a9bf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Security for rpy2 3.6.0.dev2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page