'How to set the library path of an R package to rpy2?

I am trying to invoke an R package in Python. The R package is politeness (https://cran.r-project.org/web/packages/politeness/vignettes/politeness.html) and I was able to run that on a local machine.

However, when trying to call the package on Deepnote, Rpy2 is not locating the politeness package, making the following error.

PackageNotInstalledError: The R package "politeness" is not installed.

Any suggestions are highly appreciated. Thank you



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source