# \`using JuMP\` reports an ERROR

**URL:** <https://discourse.julialang.org/t/using-jump-reports-an-error/111700>\
**Category:** Optimization (Mathematical)\
**Tags:** question, package, jump, error\
**Created:** [March 16, 2024, 4:20pm UTC](https://discourse.julialang.org/t/using-jump-reports-an-error/111700 "2024-03-16T16:20:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Post date:** [March 16, 2024, 4:20pm UTC](https://discourse.julialang.org/t/using-jump-reports-an-error/111700/1 "2024-03-16T16:20:44Z")

</div>

It reports an `ERROR` when I `using JuMP` (version: `JuMP v1.20.0`):

```julia
[Info: Precompiling JuMP [4076af6c-e467-56ae-b986-b466b2749572]
ERROR: LoadError: ArgumentError: Package JuMP does not have SnoopPrecompile 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 JuMP checked out for development and have
  added SnoopPrecompile as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with JuMP
Stacktrace:
 [1] macro expansion
   @ .\loading.jl:1599 [inlined]
 [2] macro expansion
   @ .\lock.jl:267 [inlined]
 [3] require(into::Module, mod::Symbol)
   @ Base .\loading.jl:1576
 [4] include
   @ .\Base.jl:457 [inlined]
 [5] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
   @ Base .\loading.jl:2010
 [6] top-level scope
   @ stdin:2
in expression starting at C:\Users\Name\.julia\packages\JuMP\ptoff\src\JuMP.jl:11
in expression starting at stdin:2

```

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [March 16, 2024, 6:57pm UTC](https://discourse.julialang.org/t/using-jump-reports-an-error/111700/2 "2024-03-16T18:57:33Z")

</div>

I suppose not the first nor the second caveat apply?

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [March 16, 2024, 7:00pm UTC](https://discourse.julialang.org/t/using-jump-reports-an-error/111700/3 "2024-03-16T19:00:03Z")

</div>

Did you try:

```julia
mkdir MyProject
cd MyProject
julia --project="."

```

and then at the Julia prompt:

```julia
using Pkg
Pkg.add("JuMP")

```

?

---

<div class="post-metadata">

**Author:** ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Post date:** [March 17, 2024, 1:27am UTC](https://discourse.julialang.org/t/using-jump-reports-an-error/111700/4 "2024-03-17T01:27:37Z")

</div>

Well, I ran `using JuMP` again and it worked. Thanks to everyone!

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [March 17, 2024, 8:16pm UTC](https://discourse.julialang.org/t/using-jump-reports-an-error/111700/5 "2024-03-17T20:16:34Z")

</div>

JuMP v1.20.0 does not use SnoopPrecompile, so I assume that you had something weird going on with your environment (i.e., it was probably the first bullet point).
