+1 vote
in Programming Languages by (73.8k points)

When I try to install rpy2 package using pip, it gives the following error:

Building wheels for collected packages: rpy2

  Building wheel for rpy2 (pyproject.toml) ... error

  error: subprocess-exited-with-error

    × Building wheel for rpy2 (pyproject.toml) did not run successfully.

How can I install this package?

1 Answer

+1 vote
by (348k points)
selected by
Best answer

From the error message, it looks like it could not build wheel for the rpy2 package. You can try conda instead of pip; it should install the rpy2 package.

If you have not installed Miniconda or Anaconda on your system, you can download and install it from the Anaconda's website. Once Miniconda or Anaconda is installed, install rpy2 using the following command:

conda install -c conda-forge rpy2 

Related questions