oloBion / Retip

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

Fail to install Retip #5

Open QizhiSu opened 3 years ago

QizhiSu commented 3 years ago

Dear Retip developer, I am trying to use this wonderful tool, However, I keep obtaining the following error. image the problem seems to be the rJava package, but I can correctly library rJava. Do you have any clue?

best, Sukis

tobigithub commented 3 years ago

Hi Sukis, can you copy the text instead of a picture? Hard to search. Thanks Tobias

QizhiSu commented 3 years ago

Hi, here is the error message.

building package indices installing vignettes ** testing if installed package can be loaded from temporary location *** arch - i386 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 'C:/Users/qizhi/Documents/R/win-library/4.0/rJava/libs/i386/rJava.dll': LoadLibrary failure: %1 is not a valid Win32 application.

Error: loading failed Execution halted *** arch - x64 ERROR: loading failed for 'i386'

tobigithub commented 3 years ago

Make sure that R and rJava are the same versions (64-bit) or (32-bit). Reinstall Java 64-bit and see if that works, if not install also the 32-bit version. Then install rJava and make sure its running independently. Similar to: https://cimentadaj.github.io/blog/2018-05-25-installing-rjava-on-windows-10/installing-rjava-on-windows-10/

Could be above Java or rJava issue, it creates a lot of trouble, its similar to this error: https://stackoverflow.com/questions/52557019/unable-to-load-rjava-dll-not-a-valid-win32-application-while-installing-repo

QizhiSu commented 3 years ago

Many thanks. I have Java 64 bit and R 64 bit run in my PC. I will try to reinstall Java.

QizhiSu commented 3 years ago

Hi tobigithub, I have tried to install both java 64 bit and 32 bit, re-install rJava by "install.packages("rJava",,"http://rforge.net/",type="source"), but I still get the same error. here is my system: R version 4.0.3 (2020-10-10) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19041)

Besides, I noticed that in retip app website, the link to java jdk lead to the download of jdk-8u271-windows-x64.exe or jdk-8u271-windows-i586.exe, but in the last post you comment, it is jdk-10.0.1. Which one should I install? I don't understand very well what is the difference.

Thanks in advance.

tobigithub commented 3 years ago

Hi, I just installed everything on a clean machine and I could get the example Retip script working to a certain extent (Tensorflow is missing I think). In problematic cases as such I recommend to install Retip into a clean Windows VM or use Azure/Amazon cloud/Google cloud (free credit trial) with a micro instance. There can be underlying issues with existing systems such as home directories, path settings, dependent libraries, older installs that make it very hard to figure out such errors. The clean install works, I just tested it five minutes ago on a clean system, I even used an older JAVA version, so it does not require the very latest JAVA version, but I downloaded the latest R version:


1) Downloaded 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")

QizhiSu commented 3 years ago

Thanks a lot. I will try to install it in a virtual machine.

chufz commented 3 years ago

I ran into the same issues when installing the package on a windows server. Adding the option: ´devtools::install_github("Paolobnn/Retip", INSTALL_opt="--no-multiarch")´ lead to a successful installation

PaoloBnn commented 2 years ago

Thanks!