# Error installing OptiMimi

**URL:** <https://forum.mimiframework.org/t/error-installing-optimimi/303>\
**Category:** Uncategorized\
**Created:** [August 6, 2024, 7:54am UTC](https://forum.mimiframework.org/t/error-installing-optimimi/303 "2024-08-06T07:54:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![emilywen2001](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.mimiframework.org/emilywen2001/32/116_2.png) [@emilywen2001](https://forum.mimiframework.org/u/emilywen2001)\
**Post date:** [August 6, 2024, 7:54am UTC](https://forum.mimiframework.org/t/error-installing-optimimi/303/1 "2024-08-06T07:54:39Z")

</div>

![屏幕截图 2024-08-06 155117](https://canada1.discourse-cdn.com/flex031/uploads/mimiframework/original/1X/5653d20bed75b91e46ff85ffff5875ff18ee8141.png)  
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!

---

<div class="post-metadata">

**Author:** ![lrennels](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.mimiframework.org/lrennels/32/6_2.png) [@lrennels](https://forum.mimiframework.org/u/lrennels)\
**Post date:** [August 26, 2024, 4:46pm UTC](https://forum.mimiframework.org/t/error-installing-optimimi/303/2 "2024-08-26T16:46:28Z")

</div>

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.

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/mimiframework/original/1X/e26cc39e39e35948077975740dd87ea310a34ab8.png)

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?

---

<div class="post-metadata">

**Author:** ![jrising](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.mimiframework.org/jrising/32/7_2.png) [@jrising](https://forum.mimiframework.org/u/jrising)\
**Post date:** [August 27, 2024, 6:54pm UTC](https://forum.mimiframework.org/t/error-installing-optimimi/303/3 "2024-08-27T18:54:01Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![lrennels](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.mimiframework.org/lrennels/32/6_2.png) [@lrennels](https://forum.mimiframework.org/u/lrennels)\
**Post date:** [August 27, 2024, 7:29pm UTC](https://forum.mimiframework.org/t/error-installing-optimimi/303/5 "2024-08-27T19:29:54Z")

</div>

@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.

```auto
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()`.

```

---

<div class="post-metadata">

**Author:** ![emilywen2001](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.mimiframework.org/emilywen2001/32/116_2.png) [@emilywen2001](https://forum.mimiframework.org/u/emilywen2001)\
**Post date:** [August 28, 2024, 2:29am UTC](https://forum.mimiframework.org/t/error-installing-optimimi/303/6 "2024-08-28T02:29:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![emilywen2001](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.mimiframework.org/emilywen2001/32/116_2.png) [@emilywen2001](https://forum.mimiframework.org/u/emilywen2001)\
**Post date:** [August 28, 2024, 2:30am UTC](https://forum.mimiframework.org/t/error-installing-optimimi/303/7 "2024-08-28T02:30:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lrennels](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.mimiframework.org/lrennels/32/6_2.png) [@lrennels](https://forum.mimiframework.org/u/lrennels)\
**Post date:** [August 28, 2024, 3:10pm UTC](https://forum.mimiframework.org/t/error-installing-optimimi/303/8 "2024-08-28T15:10:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jrising](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.mimiframework.org/jrising/32/7_2.png) [@jrising](https://forum.mimiframework.org/u/jrising)\
**Post date:** [August 29, 2024, 2:43pm UTC](https://forum.mimiframework.org/t/error-installing-optimimi/303/9 "2024-08-29T14:43:26Z")

</div>

Excellent. Thanks for testing it!
