Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installing readxl package to R 4.1.3 running in anaconda navigator #731

Open
zzzzz0001 opened this issue May 19, 2023 · 1 comment
Open

Comments

@zzzzz0001
Copy link

R version - 4.1.3
OS - Windows 10 22H2 Home Single Language
Anaconda Navigator conda version - 23.3.1
Installation of R -> using conda terminal -> conda install -c conda-forge r-base

Using conda terminal to install readxl package

Open conda terminal -> type R and hit enter to get into R shell

install.packages("readxl")
--- Please select a CRAN mirror for use in this session ---
Warning: failed to download mirrors file (cannot open URL 'https://cran.r-project.org/CRAN_mirrors.csv'); using local file 'C:/Users/user/anaconda3/lib/R/doc/CRAN_mirrors.csv'
Warning: unable to access index for repository https://cran.csiro.au/src/contrib:
cannot open URL 'https://cran.csiro.au/src/contrib/PACKAGES'
Warning: unable to access index for repository https://cran.csiro.au/bin/windows/contrib/4.1:
cannot open URL 'https://cran.csiro.au/bin/windows/contrib/4.1/PACKAGES'
Warning messages:
1: In download.file(url, destfile = f, quiet = TRUE) :
InternetOpenUrl failed: 'A connection with the server could not be established'
2: package 'readxl' is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

So i downloaded readxl.zip from [https://cran.r-project.org/web/packages/readxl/index.html] under r-release which is mentioned in Windows binaries and I extracted it to C:\Users\users\anaconda3\Lib\R\library

Then i tried to import the library using the code

library(readxl)

and i got an error given below

Warning message:
"package 'readxl' was built under R version 4.3.0"
Error: package or namespace load failed for 'readxl' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called 'cellranger'
Traceback:

  1. library(readxl)
  2. tryCatch({
    . attr(package, "LibPath") <- which.lib.loc
    . ns <- loadNamespace(package, lib.loc)
    . env <- attachNamespace(ns, pos = pos, deps, exclude, include.only)
    . }, error = function(e) {
    . P <- if (!is.null(cc <- conditionCall(e)))
    . paste(" in", deparse(cc)[1L])
    . else ""
    . msg <- gettextf("package or namespace load failed for %s%s:\n %s",
    . sQuote(package), P, conditionMessage(e))
    . if (logical.return && !quietly)
    . message(paste("Error:", msg), domain = NA)
    . else stop(msg, call. = FALSE, domain = NA)
    . })
  3. tryCatchList(expr, classes, parentenv, handlers)
  4. tryCatchOne(expr, names, parentenv, handlers[[1L]])
  5. value[3L]
  6. stop(msg, call. = FALSE, domain = NA)
@jennybc
Copy link
Member

jennybc commented May 19, 2023

there is no package called 'cellranger'

cellranger is one of readxl's hard dependencies. The normal ways of installing a package will also install its hard dependencies, so this suggests you never went through install.packages() or similar. In any case, try installing cellranger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants