Creating an environment to use specific versions of packages, Julia uses most current anyway

I am trying to create an environment as shown here to specifically use an older version of a package (JuMPv.19), which seems to be successful.

(JuMPv.19) pkg> st
Status `~/JuliaEnvs/JuMPv.19/Project.toml`
  [2e9cd046] Gurobi v0.6.0
  [4076af6c] JuMP v0.19.2

However, when I actually run anything, it continues to use the current version of the package (JuMPv.21). When I run a simple program, I get an error that I should get with v.21 but should not get with v.19 (which is how I know it is not using the old version I want to use).

Does Julia look for some updated version of this package in a Manifest.toml outside my environment? What should I be doing instead?

When you run a script from the command line, you can select the environment with the julia --project PATH argument.

1 Like

You may be running into stacked environments:

If you previously activated an environment that (even indirectly) loaded the newer version of JuMP, the Manifest entry no longer matters.

1 Like