s-jSDM
s-jSDM copied to clipboard
install to google colab / kaggle
Hey, I wanna install sjSDM to google colab. But I get this error message. I don't know if it's easy to fix but better to check with you. Error: Failed to install 'sjSDM' from GitHub: (converted from warning) installation of package ‘/tmp/RtmpJEcT8x/file436a79464/sjSDM_0.1.3.9000.tar.gz’ had non-zero exit status Traceback:
- devtools::install_github("https://github.com/TheoreticalEcology/s-jSDM", . subdir = "sjSDM", auth_token = "xxxxxxx")
- pkgbuild::with_build_tools({ . ellipsis::check_dots_used(action = getOption("devtools.ellipsis_action", . rlang::warn)) . { . remotes <- lapply(repo, github_remote, ref = ref, subdir = subdir, . auth_token = auth_token, host = host) . install_remotes(remotes, auth_token = auth_token, host = host, . dependencies = dependencies, upgrade = upgrade, force = force, . quiet = quiet, build = build, build_opts = build_opts, . build_manual = build_manual, build_vignettes = build_vignettes, . repos = repos, type = type, ...) . } . }, required = FALSE)
- install_remotes(remotes, auth_token = auth_token, host = host, . dependencies = dependencies, upgrade = upgrade, force = force, . quiet = quiet, build = build, build_opts = build_opts, build_manual = build_manual, . build_vignettes = build_vignettes, repos = repos, type = type, . ...)
- tryCatch(res[[i]] <- install_remote(remotes[[i]], ...), error = function(e) { . stop(remote_install_error(remotes[[i]], e)) . })
- tryCatchList(expr, classes, parentenv, handlers)
- tryCatchOne(expr, names, parentenv, handlers[[1L]])
- value[3L]
Hi, how do you run R in google colab? I thought they only supported python?
Hey, There's two ways to use R in google colab. (see https://towardsdatascience.com/how-to-use-r-in-google-colab-b6e02d736497). I tried to install sjsdm in both R and python (followed by your python installation). Both of the them give an error when trying to install a compressed file. I don't know it's a security issue from google or it's actually sth that you can try to fix?
Hi, devtools::install doesn't work for me either, I then cloned the repository via git (!git clone ...) and was finally able to install the package via install.package("s-jSDM/sjSDM", repos=NULL). However, the bad news - the session crashes every time I try to load the package, I realized pretty quikly that the problem seems to be with the reticulate package, when running reticulat::py_config() the session crashes. So I am not sure if it's worth the time to get it somehow to run (if it is even possible). CanI ask why you want to use colab? Because of the remote resources / runtime?
Question from a user about install instructions for a kaggle R notebook:
- turn on the internet connection of the kaggle notebook (which means that you have to verify your account https://www.kaggle.com/product-feedback/63544)
- sjSDM installation: i. devtools::install_github("https://github.com/TheoreticalEcology/s-jSDM", subdir = "sjSDM", dep=FALSE) # dep = FALSE is important! ii. sjSDM::install_sjSDM(version="gpu”) # will throw an error but still run it iii. reticulate::conda_install(packages=c("torch torchvision torchaudio pyro-ppl torch_optimizer"), pip = TRUE)
- sjSDM should run now