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

Problem whit JuliaCall in R... #202

Closed
Lili-619 opened this issue Jun 30, 2023 · 2 comments
Closed

Problem whit JuliaCall in R... #202

Lili-619 opened this issue Jun 30, 2023 · 2 comments

Comments

@Lili-619
Copy link

My problem in R is the next:

library(JuliaCall)
julia_setup()
Julia version 1.9.1 at location C:\Users\mictl\AppData\Local\Programs\JULIA-~1.1\bin will be used.
Loading setup script for JuliaCall...
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:/Program Files/R/R-4.3.1
";Base.include(Main,"C:/Users/mictl/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

I change the PATH of JULIA_HOME= "C:/Users/mictl/AppData/Local/Programs/Julia-1.9.1/bin"
But, the program say:

library("JuliaCall")

julia_setup()
Error in julia_setup() : Julia is not found.

I don't understand what happend. Please I need your help!

@stla
Copy link

stla commented Jul 3, 2023

Same problem with 1.9.1. Looks like something has changed and a script does not work anymore.

julia> ENV["R_HOME"] = "C:/Users/sdl96354/AppData/Local/Programs/R/R-4.3.1"
"C:/Users/sdl96354/AppData/Local/Programs/R/R-4.3.1"

julia> Base.include(Main,"C:/Users/sdl96354/AppData/Local/Programs/R/R-4.3.1/library/JuliaCall/julia/setup.jl")
[ Info: Precompiling RCall [6f49c342-dc21-5d91-9882-a32aef131414]
ERROR: LoadError: syntax: Global method definition around C:\Users\sdl96354\AppData\Local\Programs\R\R-4.3.1\library\JuliaCall\julia\JuliaObject.jl:77 needs to be placed at the top level, or use "eval".
Stacktrace:
 [1] top-level scope
   @ C:\Users\sdl96354\AppData\Local\Programs\R\R-4.3.1\library\JuliaCall\julia\JuliaObject.jl:75
 [2] include(mod::Module, _path::String)
   @ Base .\Base.jl:457
 [3] include(x::String)
   @ Main.JuliaCall C:\Users\sdl96354\AppData\Local\Programs\R\R-4.3.1\library\JuliaCall\julia\setup.jl:16
 [4] top-level scope
   @ C:\Users\sdl96354\AppData\Local\Programs\R\R-4.3.1\library\JuliaCall\julia\setup.jl:99
 [5] include(mod::Module, _path::String)
   @ Base .\Base.jl:457
 [6] top-level scope
   @ REPL[2]:1
in expression starting at C:\Users\sdl96354\AppData\Local\Programs\R\R-4.3.1\library\JuliaCall\julia\JuliaObject.jl:75
in expression starting at C:\Users\sdl96354\AppData\Local\Programs\R\R-4.3.1\library\JuliaCall\julia\setup.jl:16

@Non-Contradiction
Copy link
Collaborator

It seems that the problem should be fixed by merging #199 @Lili-619 @stla
So before the new version of JuliaCall is on CRAN, you may try the fix by using devtools to install the master version of JuliaCall.
If there is still any problem with the fix, pls feel free to reopen the issue.
Thank you for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants