RStudio Fails to Detect Installed Packages in Jupyter Notebook
Verfasst: Fr Mär 28, 2025 8:46 am
Hello
I recently set up Jupyter Notebook with R using the IRKernel but I am facing an issue where RStudio and Jupyter seem to behave differently when detecting installed packages. Packages installed through RStudio work fine within RStudio but when I try to load them in a Jupyter Notebook, I get errors saying the package is not found. However, running .libPaths() in both environments shows different library paths; which might be causing the issue.
I have tried explicitly setting the library path using .libPaths() in Jupyter Notebook, reinstalling the packages from within Jupyter & ensuring that both RStudio and Jupyter are using the same R version. Despite these efforts; the issue persists.
I’m wondering if there is a way to unify the package library paths between the two environments so that installed packages are accessible in both. Checked https://irkernel.github.io/installation/ guide related to this and found it quite informative.
Has anyone else encountered this issue with IRKernel? What’s the best way to ensure a consistent package environment across RStudio and Jupyter? Any advice would be appreciated!
Thank you !!
Salesforce Developer
I recently set up Jupyter Notebook with R using the IRKernel but I am facing an issue where RStudio and Jupyter seem to behave differently when detecting installed packages. Packages installed through RStudio work fine within RStudio but when I try to load them in a Jupyter Notebook, I get errors saying the package is not found. However, running .libPaths() in both environments shows different library paths; which might be causing the issue.

I have tried explicitly setting the library path using .libPaths() in Jupyter Notebook, reinstalling the packages from within Jupyter & ensuring that both RStudio and Jupyter are using the same R version. Despite these efforts; the issue persists.

Has anyone else encountered this issue with IRKernel? What’s the best way to ensure a consistent package environment across RStudio and Jupyter? Any advice would be appreciated!
Thank you !!

Salesforce Developer