pritesh.patel2pritesh.patel2 Member Posts: 1


I'm trying to run the following code:

from rpy2.robjects.packages import importr

But I get an error that says "No module named 'rpy2'"

so then I go to install rpy2 using

!pip install rpy2

and I get this error:

command"python setup.py egg_info" failed with error code 1 in /tmp/pip-buiild-il52ir1w/rpy2/

any and all help would be greatly appreciated.

Fair warning....I'm new to all this, so please explain what to do as if I were a 6 year old.

Thank you.


  • katie.shakmankatie.shakman Administrator, Domino Posts: 233 admin

    Two common reasons for an error like this are (1) trying to install the package locally in the workspace and not having sufficient access or (2) accidentally using the wrong compute environment, when one already exists that has the packages you need set up. In both cases the best thing to do is make sure you're using the correct compute environment, and to add the package to the compute environment using the Dockerfile instructions section of the environment page (if you're using a global or organization-managed environment, you may need to ask an admin or the organization owner to add the package for you). You can learn more about Domino's Compute Environments here: https://docs.dominodatalab.com/en/3.6/reference/environments/Video_introduction_to_Domino_Environments.html


    Field Data Scientist @ Domino

Sign In or Register to comment.