# Error Running Simple Gaussian Demo - Turing.jl

**URL:** <https://discourse.julialang.org/t/error-running-simple-gaussian-demo-turing-jl/97553>\
**Category:** Probabilistic Programming\
**Tags:** turing\
**Created:** [April 16, 2023, 5:07pm UTC](https://discourse.julialang.org/t/error-running-simple-gaussian-demo-turing-jl/97553 "2023-04-16T17:07:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshuaderekwhite](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joshuaderekwhite/32/49091_2.png) [@joshuaderekwhite](https://discourse.julialang.org/u/joshuaderekwhite)\
**Post date:** [April 16, 2023, 5:07pm UTC](https://discourse.julialang.org/t/error-running-simple-gaussian-demo-turing-jl/97553/1 "2023-04-16T17:07:19Z")

</div>

Hello,

I am trying to run the Simple Gaussian Demo found here: [https://turing.ml/v0.22/docs/using-turing/guide](https://turing.ml/v0.22/docs/using-turing/guide). I have copied the gdemo model as written as well as c1-c6. c1 and c2 run without any errors, however for c3-c6 I am getting the same error; “ERROR: MethodError: no method matching ADgradient”. I am currently running Turing v0.23.3. I tried updating Zygote, LogDensityProblemsAD, and ForwardDiff all to no avail. Any suggestions on how to get this resolved, or is anyone else having similar issues? Thanks!

---

<div class="post-metadata">

**Author:** ![acwatt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/acwatt/32/35645_2.png) [@acwatt](https://discourse.julialang.org/u/acwatt)\
**Post date:** [April 18, 2023, 7:02am UTC](https://discourse.julialang.org/t/error-running-simple-gaussian-demo-turing-jl/97553/2 "2023-04-18T07:02:01Z")

</div>

I also am getting the same error using Turing v0.23.3 and 0.24.1.

v0.24.2. and 0.24.3 seems to work for me. However, I have issues using `truncated()`, but that’s a different issue. If you aren’t going to need `truncated()`, you could try updating to 0.24.2 or 3 using  
`] add Turing@0.24.3` or just `] update Turing`

I suspect that you have other packages limiting your Turing upgrade though?

---

<div class="post-metadata">

**Author:** ![joshuaderekwhite](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joshuaderekwhite/32/49091_2.png) [@joshuaderekwhite](https://discourse.julialang.org/u/joshuaderekwhite)\
**Post date:** [April 18, 2023, 7:34pm UTC](https://discourse.julialang.org/t/error-running-simple-gaussian-demo-turing-jl/97553/3 "2023-04-18T19:34:59Z")

</div>

Correct, I am definitely having dependency issues. I tried creating a new environment and only adding Turing@0.24.3, but got a conflict with AbstractPPL and DynamicPPL. Is this consistent amongst other users? Any ways to resolve the dependency issues?

```julia
(new-turing) pkg> add Turing@0.24.3
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package AbstractPPL [7a57a42e]:
 AbstractPPL [7a57a42e] log:
 ├─possible versions are: 0.1.0-0.6.2 or uninstalled
 ├─restricted by julia compatibility requirements to versions: 0.1.0-0.5.2 or uninstalled
 ├─restricted by compatibility requirements with AbstractMCMC [80f14c24] to versions: 0.5.2-0.6.2 or uninstalled, leaving only versions: 0.5.2 or uninstalled
 │ └─AbstractMCMC [80f14c24] log:
 │ ├─possible versions are: 0.1.0-4.4.0 or uninstalled
 │ └─restricted by compatibility requirements with Turing [fce5fe82] to versions: 4.0.0-4.4.0
 │ └─Turing [fce5fe82] log:
 │ ├─possible versions are: 0.5.0-0.24.3 or uninstalled
 │ └─restricted to versions 0.24.3 by an explicit requirement, leaving only versions 0.24.3
 └─restricted by compatibility requirements with DynamicPPL [366bfd00] to versions: 0.5.3-0.5.4 — no versions left
   └─DynamicPPL [366bfd00] log:
     ├─possible versions are: 0.1.0-0.22.2 or uninstalled
     └─restricted by compatibility requirements with Turing [fce5fe82] to versions: 0.21.5-0.21.6
       └─Turing [fce5fe82] log: see above

```

---

<div class="post-metadata">

**Author:** ![acwatt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/acwatt/32/35645_2.png) [@acwatt](https://discourse.julialang.org/u/acwatt)\
**Post date:** [April 18, 2023, 8:17pm UTC](https://discourse.julialang.org/t/error-running-simple-gaussian-demo-turing-jl/97553/4 "2023-04-18T20:17:28Z")

</div>

From

```julia
restricted by julia compatibility requirements to versions

```

it looks like it’s a julia version requirement for the updated AbstractPPL package.

What’s your version of Julia? I suspect that if you upgrade to a later release, this will satisfy the AbstractPPL (and other) compat requirements.

TBH, I don’t fully understand the syntax of the compat restrictions in `Project.toml` files… I have Julia v1.8.5, but the `Project.toml` lists:

```julia
julia = "~1.6.6, 1.7.3"

```

So I would have thought I would need one of those specific versions, but Turing v0.24.3 and AbstractPPL v0.5.4 install fine on my machine with Julia v1.8.5. I guess I need to go read up about how the `[compat]` section works in `Project.toml` files. 😅

---

<div class="post-metadata">

**Author:** ![Potatoasad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/potatoasad/32/23519_2.png) [@Potatoasad](https://discourse.julialang.org/u/Potatoasad)\
**Post date:** [May 18, 2023, 3:21am UTC](https://discourse.julialang.org/t/error-running-simple-gaussian-demo-turing-jl/97553/5 "2023-05-18T03:21:08Z")

</div>

Can’t guarantee it’ll work for every one, but I was running Julia 1.8.0 and ran into the exact same error.  
I just did:

```julia
]up Turing

```

and it worked. (At least the examples from the docs work now)
