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

julia_setup unable to run the "global level startup file" #105

Closed
sylvaticus opened this issue May 27, 2019 · 4 comments
Closed

julia_setup unable to run the "global level startup file" #105

sylvaticus opened this issue May 27, 2019 · 4 comments

Comments

@sylvaticus
Copy link

sylvaticus commented May 27, 2019

julia_setup seems unable to run the "global level startup file" (???):

> library(JuliaCall)
> julia <- julia_setup()
sh: 1: Executing global level startup file../julia: not found
Error in system2(file.path(.julia$bin_dir, "julia"), shQuote(command),  : 
  error in running command

I have julia on my path and I did also try (with the same result) using:

> julia <- julia_setup(JULIA_HOME = "/home/lobianco/lib/julia-1.1.0/bin")
sh: 1: Executing global level startup file../julia: not found
Error in system2(file.path(.julia$bin_dir, "julia"), shQuote(command),  : 
  error in running command 

I have tried with Julia 0.7 and 1.0 with the same result.

@Non-Contradiction
Copy link
Collaborator

Thanks for the feedback.

What will happen if Julia is started directly?
And what will happen if you execute Base.load_julia_startup() in Julia?

@sylvaticus
Copy link
Author

Julia has two startup files, one at at [JULIA_HOME]/etc/julia/startup.jl for site-specific commands and one at ~/.julia/config/startup.jl for user-specific ones.

From my tests it is enough to set on any of them a simple println("Hello world") to trigger the error, i.e. JuliaCall seems to not work if the startup files of Julia are used:

image

Note that if I rather leave uncommented the workspace function definition and I remove the pritnln(s) it works.. it just JuliaCall doesn't like the prints in the setup files..

@Non-Contradiction
Copy link
Collaborator

Thanks for the brilliant observation! I think the problem is just the println function.
JuliaCall uses the command line to get information about Julia, and println messes the command line output.
So commenting println out is likely to solve the problem, and I'm also working on a solution now.

@Non-Contradiction
Copy link
Collaborator

The problem should be fixed on the master.

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

2 participants