Question: Error in installing Seurat
0
gravatar for vHelmholtz
5 months ago by
vHelmholtz20
United States
vHelmholtz20 wrote:

Hi everyone,

I have trouble installing Seurat in RStudio. The warning is as below. Can anyone help me?

Joshua

>install.packages("Seurat")

Installing package into ‘C:/Users/jongshin.kim/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/Seurat_3.1.1.zip' Content type 'application/zip' length 2166182 bytes (2.1 MB) downloaded 2.1 MBenter code here

> library(Seurat)

Registered S3 method overwritten by 'R.oo': method from
throw.default R.methodsS3 Error: package or namespace load failed for ‘Seurat’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘htmlwidgets’

seurat • 1.1k views
ADD COMMENTlink modified 5 months ago • written 5 months ago by vHelmholtz20
1
gravatar for Kevin Blighe
5 months ago by
Kevin Blighe56k
Kevin Blighe56k wrote:

Hey, please try these commands:

if (!requireNamespace('BiocManager', quietly = TRUE))
    install.packages('BiocManager')
BiocManager::install('htmlwidgets')

If that is successful:

install.packages("Seurat")
ADD COMMENTlink written 5 months ago by Kevin Blighe56k

Hi Kevin,

Thank you for your advice. I tried the commands, but there is still a warning message as below - "there is no package called 'htmlwidgets'". Do you have any advice?

> install.packages("Seurat")

Installing package into ‘C:/Users/jongshin.kim/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/Seurat_3.1.1.zip' Content type 'application/zip' length 2166182 bytes (2.1 MB) downloaded 2.1 MB

package ‘Seurat’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\jongshin.kim\AppData\Local\Temp\RtmpmaqU4R\downloaded_packages

> library(Seurat)

Error: package or namespace load failed for ‘Seurat’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘htmlwidgets’

ADD REPLYlink modified 5 months ago • written 5 months ago by vHelmholtz20

What is the output of:

if (!requireNamespace('BiocManager', quietly = TRUE))
    install.packages('BiocManager')
BiocManager::install('htmlwidgets')
ADD REPLYlink written 5 months ago by Kevin Blighe56k

The output of the commands is as below. Thanks.

Joshua

Bioconductor version 3.9 (BiocManager 1.30.7), R 3.6.1 (2019-07-05) Installing package(s) 'htmlwidgets'

There is a binary version available but the source version is later: binary source needs_compilation htmlwidgets 1.5 1.5.1 FALSE

installing the source package ‘htmlwidgets’

trying URL 'https://cran.rstudio.com/src/contrib/htmlwidgets_1.5.1.tar.gz' Content type 'application/x-gzip' length 867206 bytes (846 KB) downloaded 846 KB

ERROR: failed to lock directory 'C:/Users/jongshin.kim/Documents/R/win-library/3.6' for modifying Try removing 'C:/Users/jongshin.kim/Documents/R/win-library/3.6/00LOCK-htmlwidgets'

The downloaded source packages are in ‘C:\Users\jongshin.kim\AppData\Local\Temp\Rtmpu615qE\downloaded_packages’ installation path not writeable, unable to update packages: boot, foreign, mgcv, nlme Update old packages: 'fastmap'

Update all/some/none? [a/s/n]: a

There is a binary version available but the source version is later: binary source needs_compilation fastmap 1.0.0 1.0.1 TRUE

Binaries will be installed trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/fastmap_1.0.0.zip' Content type 'application/zip' length 413010 bytes (403 KB) downloaded 403 KB

package ‘fastmap’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\jongshin.kim\AppData\Local\Temp\Rtmpu615qE\downloaded_packages Warning message: In install.packages(...) : installation of package ‘htmlwidgets’ had non-zero exit status

ADD REPLYlink modified 5 months ago • written 5 months ago by vHelmholtz20
1

please close all R sessions and then delete this directory: C:/Users/jongshin.kim/Documents/R/win-library/3.6/00LOCK-htmlwidgets

Then, restart R and try the same command again:

if (!requireNamespace('BiocManager', quietly = TRUE))
    install.packages('BiocManager')
BiocManager::install('htmlwidgets')

When it asks you to update extra packages, select n for now.

ADD REPLYlink modified 5 months ago • written 5 months ago by Kevin Blighe56k
1

Hi Kevin,

It works. Thank you so much. I really appreciate it!

Joshua

ADD REPLYlink written 5 months ago by vHelmholtz20

If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one if they work.
Upvote|Bookmark|Accept

ADD REPLYlink modified 5 months ago • written 5 months ago by genomax80k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2158 users visited in the last hour