Error installing OptiMimi


I want to use OptiMimi to optimize DICE model, but I have difficulty installing OptiMimi and I don’t know how to solve this problem. It would be great if somebody can help me figure it out!

Hi @emilywen2001 thank you for the question! This looks like an environments problem where your environment is unable to find a permutation of versions of OptiMimi, Mimi, and MimiDICE2016R2 that are all compatible.

I don’t directly develop OptiMimi, but to experiment and see if I can help on the Mimi side, in a clean environment I took a look and found that I think the incompatibility lies in some packages that OptiMimi depends on, because OptiMimi does not impose many package version compatibility constraints it is likely a problem downstream.

I think this may be related to an issue I have seen with SparseArrays, @jrising have you seen this at all? It might be a situation where waiting a bit for those packages to resolve their compatibility issues is the most direct path forward?

@emilywen2001 Thanks for sharing the error. I haven’t seen this before, but my local version of OptiMimi is more updated that the official package version I have registered with Julia.

Could you try add OptiMimi#master rather than just add OptiMimi? If that works for you, then I’ll update the registered version.

This command works for me.

@jrising FWIW I think this worked for me, except I think we need to add Random to the dependencies of OptiMimi? I get a recompilation error from using OptiMimi but definitely got passed the previous Error.

ERROR: LoadError: ArgumentError: Package OptiMimi does not have Random in its dependencies:
- You may have a partially installed environment. Try `Pkg.instantiate()`
  to ensure all packages in the environment are installed.
- Or, if you have OptiMimi checked out for development and have
  added Random as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.

Thank you for your advice, I have tried your advice and it works for me!

Yes, I faced this question too and adding Random package still didn’t work.

Makes sense, I’ll open a PR on the package that adds Random to its dependencies and test they out. If it works then we’re in good shape once we merge and tag.

Excellent. Thanks for testing it!