oloBion / Retip

Retip - Retention Time prediction for metabolomics
31 stars 16 forks source link

Fail to Install Retip #8

Closed TalWac closed 3 years ago

TalWac commented 3 years ago

Dear Retip developer, I'm haveing issues that could not solve in installing the packge.

My system : > version _ platform x86_64-w64-mingw32 arch x86_64 os mingw32 system x86_64, mingw32 status major 3 minor 6.2 year 2019 month 12 day 12 svn rev 77560 language R version.string R version 3.6.2 (2019-12-12) nickname Dark and Stormy Night

I'm receiving this message:

``> devtools::install_github("Paolobnn/Retip", force = TRUE) Downloading GitHub repo Paolobnn/Retip@HEAD √ checking for file 'C:\Users\BCDD\AppData\Local\Temp\RtmpI7Ny7t\remotesc6984303216d\PaoloBnn-Retip-8c23eda/DESCRIPTION' (461ms)

Installing package into ‘D:/BCDD/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified)

Any idea how to solve this? (If is there any more info needed please tell me)

Many thanks, Tal

tobigithub commented 3 years ago

Hi, there are multiple dependencies and I see the first error is from ggplot, not retip per se.

Error: (converted from warning) package 'ggplot2' was built under R version 3.6.3
Execution halted

So try to use R 3.6.3 (not sure if that is possible). Otherwise I always recommend to install packages into a new virtual machine or a free microinstance on the cloud, like Azure, Google or AWS. Just to make sure your current machine setup is not the source of trouble or is not going to be destroyed by the DLL hell. See also here, I recently did a step-by-step install and everything worked fine. Clean cloud install of retip That does not mean there is no possible error in retip, it is just the quickest solution to test and use retip. Cheers Tobias

TalWac commented 3 years ago

Hi, Thank you for your reply! I'm not sure I understand what is a virtual machine and how to install it. But I did re-install Java and rJava package, so the former error message is gone now.

Having this one:

Error: package or namespace load failed for 'Retip':
 .onLoad failed in loadNamespace() for 'rJava', details:
  call: inDL(x, as.logical(local), as.logical(now), ...)
  error: unable to load shared object 'D:/BCDD/Documents/R/win-library/4.0/rJava/libs/i386/rJava.dll':
  LoadLibrary failure:  %1 is not a valid Win32 application.

Kindly your help I'm quite lost

Many thanks

tobigithub commented 3 years ago

Hi, rJava is tricky (your error), there can be underlying issues with the existing system such as home directories, path settings, dependent libraries, older installs that make it very hard to figure out such problems. The clean install works, I just tested it a while ago on a clean VM.

1) Download R-4.0.3 (64 bit only) https://cran.r-project.org/bin/windows/base/

2) Check JAVA version (or install it) in command line (CMD) java -version java version "1.8.0_261" Java(TM) SE Runtime Environment (build 1.8.0_261-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)

3) Back in R: install.packages("rJava") 4) library(rJava) 5) .jinit

6) print(.jclassPath()) [1] "C:\Program Files\R\R-4.0.3\library\rJava\java"

7) rj <- .jnew("java/lang/String", "Its me rJava here!"); print(rj) [1] "Java-Object{Its me rJava here!}"

8) Install R-tools ( rtools40-x86_64.exe ) from https://cran.rstudio.com/bin/windows/Rtools/

8) Now R and rJava are working, its time to prime retip 9) install.packages("devtools")

10) devtools::install_github("Paolobnn/Retiplib")

11) devtools::install_github("Paolobnn/Retip")

12) library(keras) install_keras() Miniconda[Y]: (yes) Installation complete.

13) install.packages("lightgbm", repos = "https://cran.r-project.org")

library(lightgbm) Loading required package: R6

14) install.packages("readxl")

15) install.packages("rf")

TalWac commented 3 years ago

Thank you for the links! greatly appreciated :)