Error in 'pillar' when installing 'tidyverse'

package-installation
#1

Hi everybody,
I'm having this problem but I am not sure what is the source of it.

Basically, when I try to load 'tidyverse', I get an error message telling me:

library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘pillar’
In addition: Warning message:
In dir.create(tempPath, recursive = TRUE) :
cannot create dir 'C:\Users????????? ????', reason 'Invalid argument'

I also tried to install 'pillar' but it did not work.

install.packages("pillar")
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/pillar_1.4.0.zip'
Content type 'application/zip' length 181034 bytes (176 KB)
downloaded 176 KB

package ‘pillar’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\ÚÈÏÇáÑÍãä ÏáÇß\AppData\Local\Temp\RtmpwZl0du\downloaded_packages
Warning message:
In dir.create(tempPath, recursive = TRUE) :
cannot create dir 'C:\Users????????? ????', reason 'Invalid argument'

I would highly appreciate any help. I am also running R studio as administrator.
Thanks,

0 Likes

#2

Do other packages install correctly for you?

Could you also give us some info on your system setup (e.g.

Is this exactly what you see on your machine? (I just want to make sure nothing is getting lost in translation between your system and what's printed here)

OS, R version, RStudio version, locale)?

0 Likes

#3

Thanks Mara!

Do other packages install correctly for you?
No, I think there is something wrong going on. For instance, we I try to load 'esquisse', i get this reply:

install.packages("esquisse")
also installing the dependency ‘ggthemes’

There is a binary version available but the source
version is later:
binary source needs_compilation
ggthemes 4.1.1 4.2.0 FALSE

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/esquisse_0.1.7.zip'
Content type 'application/zip' length 734520 bytes (717 KB)
downloaded 717 KB

package ‘esquisse’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\ÚÈÏÇáÑÍãä ÏáÇß\AppData\Local\Temp\Rtmpkl3XOS\downloaded_packages
installing the source package ‘ggthemes’

trying URL 'https://cran.rstudio.com/src/contrib/ggthemes_4.2.0.tar.gz'
Content type 'application/x-gzip' length 423927 bytes (413 KB)
downloaded 413 KB

  • installing source package 'ggthemes' ...
    ** package 'ggthemes' successfully unpacked and MD5 sums checked
    ** using staged installation
    Error in .read_description(dfile) :
    file 'C:/Users/ÚÈÏÇáÑÍãä ÏáÇß/AppData/Local/Temp/RtmpQXH99C/R.INSTALL29341b4e2eb0/ggthemes/DESCRIPTION' does not exist
    ERROR: installing package DESCRIPTION failed for package 'ggthemes'
  • removing 'C:/Program Files/R/R-3.6.0/library/ggthemes'
    Warning in install.packages :
    installation of package ‘ggthemes’ had non-zero exit status

The downloaded source packages are in
‘C:\Users\ÚÈÏÇáÑÍãä ÏáÇß\AppData\Local\Temp\Rtmpkl3XOS\downloaded_packages’

0 Likes

#4

Then, when I try to install 'ggthemes', I get:

install.packages("ggthemes")

There is a binary version available but the source
version is later:
binary source needs_compilation
ggthemes 4.1.1 4.2.0 FALSE

installing the source package ‘ggthemes’

trying URL 'https://cran.rstudio.com/src/contrib/ggthemes_4.2.0.tar.gz'
Content type 'application/x-gzip' length 423927 bytes (413 KB)
downloaded 413 KB

  • installing source package 'ggthemes' ...
    ** package 'ggthemes' successfully unpacked and MD5 sums checked
    ** using staged installation
    Error in .read_description(dfile) :
    file 'C:/Users/ÚÈÏÇáÑÍãä ÏáÇß/AppData/Local/Temp/RtmpWu6MuN/R.INSTALL436072f2630/ggthemes/DESCRIPTION' does not exist
    ERROR: installing package DESCRIPTION failed for package 'ggthemes'
  • removing 'C:/Program Files/R/R-3.6.0/library/ggthemes'
    Warning in install.packages :
    installation of package ‘ggthemes’ had non-zero exit status

The downloaded source packages are in
‘C:\Users\ÚÈÏÇáÑÍãä ÏáÇß\AppData\Local\Temp\Rtmpkl3XOS\downloaded_packages’

As for my system specifications:
Windows 10 (the latest update)
RStudio version: 1.2.1335
R version: 3.6.0
RStudio locale: [1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252"

R locate: [1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252"

0 Likes

#5

Do installations work for you in R, but not in RStudio? (see FAQ below for disambiguation)

0 Likes

#6

Neither in R. I tried installing "esquisse" for instance, but I got:

install.packages("esquisse")
Warning in install.packages("esquisse") :
'lib = "C:/Program Files/R/R-3.6.0/library"' is not writable
Error in install.packages("esquisse") :
unable to create ‘C:\Users<U+0639><U+0628><U+062F><U+0627><U+0644><U+0631><U+062D><U+0645><U+0646> <U+062F><U+0644><U+0627><U+0643>\OneDrive<U+0627><U+0644><U+0645><U+0633><U+062A><U+0646><U+062F><U+0627><U+062A>/R/win-library/3.6’
In addition: Warning message:
In dir.create(userdir, recursive = TRUE) :
cannot create dir 'C:\Users<U+0639><U+0628><U+062F><U+0627><U+0644><U+0631><U+062D><U+0645><U+0646> <U+062F><U+0644><U+0627><U+0643>', reason 'Invalid argument'

I also noticed that R cannot installed some packages although they are already installed such as ggplot2.

install.packages("ggplot2")
Warning in install.packages("ggplot2") :
'lib = "C:/Program Files/R/R-3.6.0/library"' is not writable
Error in install.packages("ggplot2") :
unable to create ‘C:\Users<U+0639><U+0628><U+062F><U+0627><U+0644><U+0631><U+062D><U+0645><U+0646> <U+062F><U+0644><U+0627><U+0643>\OneDrive<U+0627><U+0644><U+0645><U+0633><U+062A><U+0646><U+062F><U+0627><U+062A>/R/win-library/3.6’
In addition: Warning message:
In dir.create(userdir, recursive = TRUE) :
cannot create dir 'C:\Users<U+0639><U+0628><U+062F><U+0627><U+0644><U+0631><U+062D><U+0645><U+0646> <U+062F><U+0644><U+0627><U+0643>', reason 'Invalid argument'

I also tried to reinstall ggplot via RStudio and it worked well, but not in R.

0 Likes

#7

Hmm, I'm not 100% sure what the problem is. I'm going to move this in to #general, since it doesn't seem to be specific to tidyverse packages. Hopefully someone there will have better advice.

0 Likes

#8

Problem solved!

I just managed to solve the problem basically by changing my computer's username. My computer username used to consist of two names (with space between them "Cat Cat". I just realized that and it caused many problems not only with R but also with MATLAB and Python, but once I changed my computer's username to one word only (or two words without space), this change was automatically reflected in the path. Therefore, all my problems with package installing were easily solved.
Above are the kinds of errors that occurred because of this problem.

Thank you for your concerns Mara!

1 Like