I am solving a non-linear optimization problem using BARON. The BARON.jl package version I am using is 0.6.2 and it seems to be working fine. But after I update the package to 0.6.3 or 0.6.4, following error is displayed:
ERROR: IOError: could not spawn `Caroaron.exe 'C:\Users\Dell\AppData\Local\Temp\jl_ldhYWv\baron_problem.bar'`: no such file or directory (ENOENT)
Any suggestions on how to resolve this error?
The path to the BARON executable seems garbled (
Caroaron.exe). Can you rebuild the BARON package and check that the contents of
deps/path.jl make sense? You will need to have set the
BARON_EXEC environment variable.
I rebuild the package and the content of
const baron_exec = "C:\baron\baron.exe"
BARON_EXEC environment variable is also set as follows:
Same error pops even after rebuilding the package.
You probably want
C:/baron/baron.exe indeed works. Thank you @odow and @joehuchette!
Is this the reason why
C:\baron\baron.exe was working perfectly uptil now? Also, my environment variables for some other packages (e.g. CPLEX) are set using ‘
\’ and they seems to be working perfectly fine. (I am on a windows machine).
Maybe you were on an older version of Baron.jl? The change is fairly recent. The problem isn’t the environmental variables, it’s that they get written to a file in a way that messes up the slashes on Windows. I submitted a PR to fix it, so it should get fixed in the library soon (https://github.com/joehuchette/BARON.jl/pull/43), but just adding the
/ to the
deps/path.jl file should work too.
(edit: at least I think so! not totally confident with how the paths work on Windows…)
The latest tagged version should have a fix, if you want to give it an update.
Thank you for the quick fix!