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

Fail to install Retip #5

Open
QizhiSu opened this issue Dec 11, 2020 · 9 comments
Open

Fail to install Retip #5

QizhiSu opened this issue Dec 11, 2020 · 9 comments

Comments

@QizhiSu
Copy link

QizhiSu commented Dec 11, 2020

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
Copy link
Collaborator

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

@QizhiSu
Copy link
Author

QizhiSu commented Dec 12, 2020

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'

  • removing 'C:/Users/qizhi/Documents/R/win-library/4.0/Retip'

@tobigithub
Copy link
Collaborator

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
Copy link
Author

QizhiSu commented Dec 12, 2020

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

@QizhiSu
Copy link
Author

QizhiSu commented Dec 16, 2020

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
Copy link
Collaborator

tobigithub commented Dec 16, 2020

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/

  9. Now R and rJava are working, its time to prime retip

  10. install.packages("devtools")

  11. devtools::install_github("Paolobnn/Retiplib")

  • DONE (Retiplib)
  1. devtools::install_github("Paolobnn/Retip")
  • DONE (Retip)
  1. library(keras)
    install_keras()
    Miniconda[Y]: (yes)
    Installation complete.

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

library(lightgbm)
Loading required package: R6

  1. install.packages("readxl")

  2. install.packages("rf")


@QizhiSu
Copy link
Author

QizhiSu commented Dec 16, 2020

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

@chufz
Copy link

chufz commented Jul 9, 2021

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
Copy link
Collaborator

Thanks!

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

4 participants