# Precompiling Turing package failing

**URL:** <https://discourse.julialang.org/t/precompiling-turing-package-failing/30485>\
**Category:** Probabilistic Programming\
**Created:** [October 30, 2019, 10:44am UTC](https://discourse.julialang.org/t/precompiling-turing-package-failing/30485 "2019-10-30T10:44:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![wattsmo](https://avatars.discourse-cdn.com/v4/letter/w/c0e974/32.png) [@wattsmo](https://discourse.julialang.org/u/wattsmo)\
**Post date:** [October 30, 2019, 10:44am UTC](https://discourse.julialang.org/t/precompiling-turing-package-failing/30485/1 "2019-10-30T10:44:03Z")

</div>

I have been trying to use the Turing.jl package,  
MacOS v10.15,

I successfully added the package Turing v0.7.0, with dependent packages Zygote v0.3.0, IRTools v0.3.0

but when executing:  
using Turing

I get precompile error:  
**[Info:** Precompiling Turing [fce5fe82-541a-59a6-adf8-730c64b5f9a0]  
**ERROR:** LoadError: LoadError: UndefVarError: Argument not defined  
Stacktrace:  
[1] **include** at **./boot.jl:328** [inlined]  
[2] **include\_relative(** ::Module, ::String **)** at **./loading.jl:1094**  
[3] **include** at **./Base.jl:31** [inlined]  
[4] **include(** ::String **)** at **/Users/martinwatts/.julia/packages/Zygote/kTgN8/src/Zygote.jl:1**  
[5] top-level scope at **/Users/martinwatts/.julia/packages/Zygote/kTgN8/src/Zygote.jl:24**  
[6] **include** at **./boot.jl:328** [inlined]  
[7] **include\_relative(** ::Module, ::String **)** at **./loading.jl:1094**  
[8] **include(** ::Module, ::String **)** at **./Base.jl:31**  
[9] top-level scope at **none:2**  
[10] **eval** at **./boot.jl:330** [inlined]  
[11] **eval(** ::Expr **)** at **./client.jl:432**  
[12] top-level scope at **./none:3**  
in expression starting at /Users/martinwatts/.julia/packages/Zygote/kTgN8/src/compiler/reverse.jl:1  
in expression starting at /Users/martinwatts/.julia/packages/Zygote/kTgN8/src/Zygote.jl:24

Cause of the error is that Zygote package tries to import IRTools:Argument but IRTools does not export Argument

Any known fixes to this problem?

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [October 30, 2019, 1:54pm UTC](https://discourse.julialang.org/t/precompiling-turing-package-failing/30485/2 "2019-10-30T13:54:02Z")

</div>

Try updating `Turing`.

---

<div class="post-metadata">

**Author:** ![wattsmo](https://avatars.discourse-cdn.com/v4/letter/w/c0e974/32.png) [@wattsmo](https://discourse.julialang.org/u/wattsmo)\
**Post date:** [October 30, 2019, 4:06pm UTC](https://discourse.julialang.org/t/precompiling-turing-package-failing/30485/3 "2019-10-30T16:06:17Z")

</div>

Did manifest update giving changes  
Updating `~/Code/julia1.2/turing_test/prjcfg/Project.toml`  
[fce5fe82] ↑ Turing v0.7.0 ⇒ v0.7.2  
Updating `~/Code/julia1.2/turing_test/prjcfg/Manifest.toml`  
[00ebfdb7] ↑ CSTParser v0.6.2 ⇒ v1.0.0  
[864edb3b] ↑ DataStructures v0.17.3 ⇒ v0.17.5  
[31c24e10] ↑ Distributions v0.21.3 ⇒ v0.21.5  
[1a297f60] ↓ FillArrays v0.7.4 ⇒ v0.6.4  
[f6369f11] ↑ ForwardDiff v0.10.3 ⇒ v0.10.4  
[28b8d3ca] ↑ GR v0.41.0 ⇒ v0.42.0  
[7869d1d1] ↓ IRTools v0.3.0 ⇒ v0.2.3  
[a98d9a8b] ↑ Interpolations v0.12.2 ⇒ v0.12.3  
[5078a376] ↓ LazyArrays v0.12.3 ⇒ v0.10.0  
[85a6dd25] ↑ PositiveFactorizations v0.2.2 ⇒ v0.2.3  
[fce5fe82] ↑ Turing v0.7.0 ⇒ v0.7.2  
[e88e6eb3] ↑ Zygote v0.3.0 ⇒ v0.3.4  
[700de1a5] + ZygoteRules v0.1.0  
Building GR → `~/.julia/packages/GR/f1Iqi/deps/build.log`

this set gave a different precompile failure but still at the interface between the Zygote and IRTools.

**julia\>** using Turing  
**[Info:** Precompiling Turing [fce5fe82-541a-59a6-adf8-730c64b5f9a0]  
**ERROR:** LoadError: LoadError: UndefVarError: argnames! not defined  
Stacktrace:  
[1] **include** at **./boot.jl:328** [inlined]  
[2] **include\_relative(** ::Module, ::String **)** at **./loading.jl:1094**  
[3] **include** at **./Base.jl:31** [inlined]  
[4] **include(** ::String **)** at **/Users/martinwatts/.julia/packages/Zygote/bdE6T/src/Zygote.jl:1**  
[5] top-level scope at **/Users/martinwatts/.julia/packages/Zygote/bdE6T/src/Zygote.jl:44**  
[6] **include** at **./boot.jl:328** [inlined]  
[7] **include\_relative(** ::Module, ::String **)** at **./loading.jl:1094**  
[8] **include(** ::Module, ::String **)** at **./Base.jl:31**  
[9] top-level scope at **none:2**  
[10] **eval** at **./boot.jl:330** [inlined]  
[11] **eval(** ::Expr **)** at **./client.jl:432**  
[12] top-level scope at **./none:3**  
in expression starting at /Users/martinwatts/.julia/packages/Zygote/bdE6T/src/compiler/interface2.jl:1  
in expression starting at /Users/martinwatts/.julia/packages/Zygote/bdE6T/src/Zygote.jl:44

I assume there must be a working set of these packages.

---

<div class="post-metadata">

**Author:** ![Kai\_Xu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kai_xu/32/10187_2.png) [@Kai\_Xu](https://discourse.julialang.org/u/Kai_Xu)\
**Post date:** [October 30, 2019, 8:48pm UTC](https://discourse.julialang.org/t/precompiling-turing-package-failing/30485/4 "2019-10-30T20:48:58Z")

</div>

The latest release should be v0.7.2. Can you try `] add Turing`?

UPDATE: sorry I didn’t see the latest reply.

---

<div class="post-metadata">

**Author:** ![Kai\_Xu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kai_xu/32/10187_2.png) [@Kai\_Xu](https://discourse.julialang.org/u/Kai_Xu)\
**Post date:** [October 31, 2019, 6:02pm UTC](https://discourse.julialang.org/t/precompiling-turing-package-failing/30485/5 "2019-10-31T18:02:12Z")

</div>

I tried a fresh installation of Julia v1.2.0 on macOS and the precompilation works. Can you try to remove Zygote and Turing and `] add Turing` again?

---

<div class="post-metadata">

**Author:** ![wattsmo](https://avatars.discourse-cdn.com/v4/letter/w/c0e974/32.png) [@wattsmo](https://discourse.julialang.org/u/wattsmo)\
**Post date:** [November 1, 2019, 7:52am UTC](https://discourse.julialang.org/t/precompiling-turing-package-failing/30485/6 "2019-11-01T07:52:26Z")

</div>

Thanks, it is now precompiling and I am able to execute the Getting Started example.
