I used conda install -c vfonov r-ggmap to install ggmap package. When I tried to load the package in Jupyter notebook, I got the following error:
Error: package or namespace load failed for ‘ggmap’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/anaconda3/lib/R/library/jpeg/libs/jpeg.so':
dlopen(/anaconda3/lib/R/library/jpeg/libs/jpeg.so, 6): Library not loaded: #rpath/libjpeg.9.dylib
Referenced from: /anaconda3/lib/R/library/jpeg/libs/jpeg.so
Reason: Incompatible library version: jpeg.so requires version 13.0.0 or later, but libjpeg.9.dylib provides version 12.0.0
Traceback:
1. library(ggmap)
2. tryCatch({
. attr(package, "LibPath") <- which.lib.loc
. ns <- loadNamespace(package, lib.loc)
. env <- attachNamespace(ns, pos = pos, deps)
. }, 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)
. 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]](cond)
6. stop(msg, call. = FALSE, domain = NA)
I appreciate any help.
The solution is surprisingly easy.
conda install -c conda-forge jpeg
done.
Related
error
install.package is fine.
But when i write library(magick), i get this error.
I don't understand why it doesn't install.
Another library's works fine.
=====
i write:
install.packages("magick")
library(magick)
i get:
Error: package or namespace load failed for ‘magick’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/srv/rlibs/magick/libs/magick.so':
libMagick++-6.Q16.so.7: cannot open shared object file: No such file or directory
Traceback:
1. library(magick)
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]](cond)
stop(msg, call. = FALSE, domain = NA)
I was trying to install ggraph but is faced with this error. May i know how can i overcome this error? I updated ggplot to 3.0.0 but still the error persists.
Error: package or namespace load failed for 'ggraph':
object 'nest_legacy' is not exported by 'namespace:tidyr'
Traceback:
1. library(ggraph)
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)
. 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]](cond)
6. stop(msg, call. = FALSE, domain = NA)
I'm trying to install the package 'Hmisc' in R but I'm running into an error, shown below:
Error: package or namespace load failed for 'Hmisc' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called 'foreign'
Traceback:
1. library(Hmisc)
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)
. 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]](cond)
6. stop(msg, call. = FALSE, domain = NA)
I've looked around and can't seem to find any answers.
I'm getting the below error when trying to import library & I'm using R in Jupyter Notebook.
library(ggpubr)
Warning message:
"package 'ggpubr' was built under R version 3.6.3"
Error: package or namespace load failed for 'ggpubr' in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace 'rlang' 0.4.2 is already loaded, but >= 0.4.5 is required
Traceback:
1. library(ggpubr)
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)
. 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]](cond)
6. stop(msg, call. = FALSE, domain = NA)
I have tried the below codes to adjust it ,But it didn't workout
remove.packages("ggpubr")
&
install.packages("ggpubr")
&
update.packages(Yes)
I tried to installed keras on win10 + Rstudio 1.2, it was successfully installed, but can't be loaded.
Have tried to uninsatll, and re-install, but the error insists.
Please advise.
> install.packages("keras")
Installing package into ‘C:/Users/eric1/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.5:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.5/PACKAGES'
trying URL 'https://mran.microsoft.com/snapshot/2018-08-01/bin/windows/contrib/3.5/keras_2.1.6.zip'
Content type 'application/zip' length 2340096 bytes (2.2 MB)
downloaded 2.2 MB
package ‘keras’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\eric1\AppData\Local\Temp\RtmpaynDb0\downloaded_packages
> library(keras)
Error: package or namespace load failed for ‘keras’ in rbind(info, getNamespaceInfo(env, "S3methods")):
number of columns of matrices must match (see arg 2)
and the traceback is
> traceback()
6: stop(msg, call. = FALSE, domain = NA)
5: value[[3L]](cond)
4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
3: tryCatchList(expr, classes, parentenv, handlers)
2: tryCatch({
attr(package, "LibPath") <- which.lib.loc
ns <- loadNamespace(package, lib.loc)
env <- attachNamespace(ns, pos = pos, deps)
}, 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)
message(paste("Error:", msg), domain = NA)
else stop(msg, call. = FALSE, domain = NA)
})
1: library(keras)
With the hint from this post, I checked the reticulate, and got the same error message which i am sure it was good. So I decided the root was Python and Anaconda.
I reinstalled python and anaconda, and solved the issue.
Just make a note and hopefully it may help those who are as rooky as I am.
package or namespace load failed for ‘keras’ #268