I try to enable forward automatic differentiation to the Rosenbrock example in the documentation (link). When setting the OnceDifferentiable object I get an error:
od = OnceDifferentiable(f, initial_x; autodiff = :forward)
Oh, actually I do not have the latest version, only v 0.7.8. But when I try Pkg.update("Optim") i get the following info:
Package Optim was set to version 0.7.8, but a higher version 0.9.3 exists.
The update is prevented by explicit requirements constraints. Edit your REQUIRE file to change this.
How do I fix this, or in other words how do i edit the REQUIRE file? thx
Your REQUIRE file is located in ~/.julia/v0.6 (on mac and linux, at least). On all platforms you should be able to find its folder with Pkg.dir(). Can you show us the contents of that file? For example, you can run readlines(joinpath(Pkg.dir(), "REQUIRE"))
I tried various things, including removing both LineSearches and Optim. But I was still not able to upgrade to the latest versions, so I ended up reinstalling Julia. Now it works.