JuliaInterop / JuliaCall

Embed Julia in R
https://non-contradiction.github.io/JuliaCall/index.html
Other
267 stars 36 forks source link

the error of JuliaCall #112

Open wbk123 opened 5 years ago

wbk123 commented 5 years ago

Julia version 1.1.1 at location D:\Julia\Julia-1.1.1\bin will be used. Loading setup script for JuliaCall... Error in .julia$cmd(paste0("Base.include(Main,\"", system.file("julia/setup.jl", : Error happens when you try to execute command Base.include(Main,"D:/R/R-3.6.1/library/JuliaCall/julia/setup.jl") in Julia. To have more helpful error messages, you could considering running the command in Julia directly

How can I fix this error?

wbk123 commented 5 years ago

System is windows 7.

Non-Contradiction commented 5 years ago

Thank you for the feedback!

From the current error message, it is quite difficult to tell where the problem is.

In the page of download link: https://julialang.org/downloads/, it says that Windows Management Framework 3.0 or later is needed for Windows 7. Have you tried that?

What about running Julia directly? Is it possible to do import Pkg; Pkg.add("RCall"); Pkg.add("Suppressor") in Julia?

wbk123 commented 5 years ago

I have installed WMF4.0, I have tried all the above methods, but unfortunately, it doesn't work

Non-Contradiction commented 5 years ago

Then how about first running R.home() in R, and then do ENV["R_HOME"]="the path you just get from R.home()" in Julia, and finally do Base.include(Main,"D:/R/R-3.6.1/library/JuliaCall/julia/setup.jl") as in the error message in Julia? If everything works, then you can try to do julia_setup() again and see if it works.

wbk123 commented 5 years ago

julia> ENV["R_HOME"]=R.home("D:/R语言/R-3.6.1/bin/x64") ERROR: UndefVarError: R not defined Stacktrace: [1] top-level scope at none:0
The path of R is correct.

Non-Contradiction commented 5 years ago

Sorry that I hadn't made myself clear... What you should do is julia> ENV["R_HOME"]="D:/R语言/R-3.6.1/bin/x64"

wbk123 commented 5 years ago

julia> Base.include(Main,"D:/R语言/R-3.6.1/library/JuliaCall/julia/setup.jl") No errors, no results, just running.

Non-Contradiction commented 5 years ago

Is it still running?

wbk123 commented 5 years ago

yes, it has been running for about half an hour

Faraz564 commented 1 year ago

I have same problem. I am trying the method that used to run R.home() in console and take their output to Julia ENV["R_HOME"]="the path you just get from R.home()" but I do not know about the last step where I would run the Base.include(Main,"D:/R/R-3.6.1/library/JuliaCall/julia/setup.jl"). Please also have look on my error: Error in .julia$cmd(paste0(Rhomeset, "Base.include(Main,\"", system.file("julia/setup.jl",

I would appreciate your suggestion.

Shafique313 commented 1 year ago

Error in .julia$cmd(paste0(Rhomeset, "Base.include(Main,\"", system.file("julia/setup.jl", : Error happens when you try to execute command ENV["R_HOME"] = "C:/PROGRA~1/R/R-43~1.1";Base.include(Main,"C:/Users/shafi/AppData/Local/R/win-library/4.3/JuliaCall/julia/setup.jl") in Julia. To have more helpful error messages, you could considering running the command in Julia directly Hi everyone I ma facing this error when I call the julia_setup() How can I fix this issue. Thank you in advance.