Error creating notebook: package 'Rcpp' does not have a namespace.

A few years ago I had RStudio installed on my laptop to do my masters. With the recent Coronavirus I am now working from home and have reinstalled R and RStudio.

However, for some reason, I cannot run an R Notebook. Every time I get the error:

"Error creating notebook: package 'Rcpp' does not have a namespace."

I have tried installing the Rcpp package again, and have even tried uninstalling and reinstalling Rstudio, and even installing the previous version that I had, but the same error persists.

This seems to be unrelated to code as I get the same error when saving a fresh R Notebook.

I have tried looking online but no one seems to have a solution.

Any advice would be greatly appreciated!

Thanks
Cydney

Hi Cydney,

I had the same problem today. So I tried to reinstall "Rcpp" and got this Error in the Console:

ERROR: failed to lock directory 'C:/Users/maren/Documents/R/win-library/3.6' for modifying
Try removing 'C:/Users/maren/Documents/R/win-library/3.6/00LOCK-Rcpp'
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status

I just deleted 00LOCK-Rcpp from my library, reinstalled Rcpp without any problems. R notebook worked again.

Maybe it is the same for you. Either way you might want to check what your console gives out as problem reinstalling rcpp.

Hope it might help :slight_smile:

1 Like

Hi Maren,

That worked perfectly thank you for replying!!

Cydney

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.