Shreya Agarwal
Shreya Agarwal

Reputation: 716

Error: package or namespace load failed for ‘tidyverse’ in loadNamespace

I'm getting the following error when I'm loading tidyverse. It was all working fine a few minutes ago when I was running my shinyapp. How should I resolve this?

Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): namespace ‘rlang’ 0.3.0.1 is already loaded, but >= 0.3.1 is required

Upvotes: 28

Views: 100565

Answers (8)

khaibar_omari
khaibar_omari

Reputation: 31

I encountered the same error, but none of the solutions mentioned above worked. Instead, I resolved it by manually removing the 'cli' module, which was causing the error, from the folder where my packages for the version of R that I was using installed. You can use .libPaths() to help locate the directory where the packages are installed.

Upvotes: 1

rya
rya

Reputation: 1506

I faced this same problem and restarted R session and it worked fine after that.

Upvotes: 4

Joe Gondwe
Joe Gondwe

Reputation: 11

Start with install.packages("devtools") then install.packages("rlang").

Upvotes: 1

1darknight
1darknight

Reputation: 73

I have just encountered the similar problem.

The error could translate into understandable English as:

package 'rlang' version 0.3.0.1 is loaded into R successfully, but the other package that based on 'ralng' required a higher version (at least 0.3.1).

So that manually install.packages('rlang') will update the latest appropriate package 'rlang'

Upvotes: 2

Ibrahim
Ibrahim

Reputation: 51

In addition to unloading and reloading rlang,

Click on Tools in the tab and check for Package Updates to update tidyverse

Upvotes: 5

SimpleNEasy
SimpleNEasy

Reputation: 889

I know this might be late answer,but I had the same issue and I fixed it by updating the packages, specifically : ggplot2, scales. according to this Rstudio site

Upvotes: 1

victor mandela
victor mandela

Reputation: 21

Also had similar problem but resolved it after a struggle. I used:-

devtools::install_github("tidyverse/tidyverse")

Upvotes: 2

Abbas
Abbas

Reputation: 897

I had the same problem but managed to tackle it. You may remove the current version of rlang using the following command:

remove.packages("rlang")

and then install the rlang again:

install.packages("rlang")

After that run the library:

library(tidyverse)

Upvotes: 38

Related Questions