If I may reopen this thread, I also have issues installing Gnuplot.jl but on a mac.
I do have gnuplot installed and it is in the path of mac terminal (bash):
Within Julia, I’ve added Gnuplot.jl and running test_terminal() returns: IOError: could not spawn gnuplot --version: no such file or directory
Hence, I switch to Julia’s shell mode in order to check PATH:
Since export PATH=... does not seem to work, how to make gnuplot visible from within Julia?
Thanks! But how to edit PATH? I would like to add /opt/local/bin/ to it, then it would find gnuplot. PATH is supposed to be a shell variable but I do not manage to change it in shell mode. I also do not manage to figure out which type of shell (bash, zsh…) shell mode is actually using.
Oh, I think I was not clear /opt/local/bin is already in my PATH when I use the terminal. This is why I can use gnuplot from the command line.
My problem is that it is not in the PATH when using Julia. Therefore I try to edit PATH within Julia (using the Julia shell for example).
Have you tried invoking Julia from the same terminal? If you run it by double-clicking an icon, it may be running with a different environment. Normally, Julia should just inherit the PATH from the terminal you run it from.
Oh yes, indeed when julia is called from the terminal it does inherit the PATH variable. Thanks.
My issue was that I was running it from VScode, there the inherited PATH is different.
This line solved my issue:
ENV["PATH"] = "$(ENV["PATH"]):/opt/local/bin"
I will add it to my startup file. Thanks again these gnuplot figures look so nice…