I've Google around for a few days and searched this forum but haven't quite found a problem/solution that I'm facing.
tl;dr: I can install the 0.5.2 version of the vctrs
library in RStudio but run into an error when installing it from VSCode.
Recently when I try to load tidyverse in VSCode, I get the following error:
> library(tidyverse)
Error: package or namespace load failed for 'tidyverse' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace 'vctrs' 0.5.1 is being loaded, but >= 0.5.2 is required
Here's my sessionInfo()
output:
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8
[2] LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8
attached base packages:
[1] stats graphics grDevices datasets utils methods base
loaded via a namespace (and not attached):
[1] compiler_4.2.2 cli_3.6.0 tools_4.2.2 jsonlite_1.8.4 rlang_1.0.6
[6] renv_0.16.0
When I run install.packages("vctrs")
to get the latest 0.5.2 version, I get the following error:
> install.packages("vctrs")
Installing vctrs [0.5.1] ...
OK [linked cache]
Warning messages:
1: could not retrieve available packages for url "https://ftp.osuosl.org/pub/cran/src/contrib"
2: could not retrieve available packages for url "https://ftp.osuosl.org/pub/cran/bin/windows/contrib/4.2"
In RStudio, in a new session,when I install vctrs
I do not get an error:
> install.packages("vctrs")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/vbakshi/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/vctrs_0.5.2.zip'
Content type 'application/zip' length 1378208 bytes (1.3 MB)
downloaded 1.3 MB
package ‘vctrs’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\vbakshi\AppData\Local\Temp\1\Rtmp0YbmOi\downloaded_packages
Here's my sessionInfo()
in RStudio after I run library(vctrs)
--- it installed the 0.5.2 version
> sessionInfo()
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C LC_TIME=English_United States.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] vctrs_0.5.2
loaded via a namespace (and not attached):
[1] compiler_4.2.2 cli_3.6.0 tools_4.2.2 rstudioapi_0.14 rlang_1.0.6
Any ideas where I should look to resolve this issue in VSCode? My workaround currently is manually replacing the vctrs
folder in my libPaths()
with the 0.5.2 version.