# Failed to precompile the Turing package

**URL:** https://discourse.julialang.org/t/failed-to-precompile-the-turing-package/73283
**Category:** Package Management
**Tags:** question, package, turing
**Created:** [December 17, 2021, 9:00pm UTC](https://discourse.julialang.org/t/failed-to-precompile-the-turing-package/73283 "2021-12-17T21:00:15Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![joekang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joekang/32/32010_2.png) [@joekang](https://discourse.julialang.org/u/joekang)
#### Post date: [December 17, 2021, 9:00pm UTC](https://discourse.julialang.org/t/failed-to-precompile-the-turing-package/73283/1 "2021-12-17T21:00:15Z")

</div>

Hello,

I am trying to precompile the Turing package, but failed to do so with the following error messages. There was no error message when I added Turing. I use Ubuntu 20.04 LTS with a Dell laptop. I will appreciate if someone could share ideas on this matter.

Thanks,

Joseph

using Turing  
[Info: Precompiling Turing [fce5fe82-541a-59a6-adf8-730c64b5f9a0]  
ERROR: LoadError: LoadError: LoadError: ArgumentError: Received unrecognized keyword argument warn\_check\_args. Recognized arguments include:  
`inline`, `unroll`, `check_empty`, and `thread`.  
Stacktrace:  
[1] check\_macro\_kwarg(::Expr, ::Bool, ::Bool, ::Int8, ::Int8, ::Int64) at /home/caleb/.julia/packages/LoopVectorization/796Tt/src/constructors.jl:104  
[2] #process\_args#80 at /home/caleb/.julia/packages/LoopVectorization/796Tt/src/constructors.jl:110 [inlined]  
[3] process\_args at /home/caleb/.julia/packages/LoopVectorization/796Tt/src/constructors.jl:109 [inlined]  
[4] turbo\_macro(::Module, ::LineNumberNode, ::Expr, ::Expr, ::Vararg{Expr,N} where N) at /home/caleb/.julia/packages/LoopVectorization/796Tt/src/constructors.jl:119  
[5] @tturbo(::LineNumberNode, ::Module, ::Vararg{Any,N} where N) at /home/caleb/.julia/packages/LoopVectorization/796Tt/src/constructors.jl:225  
[6] include(::Function, ::Module, ::String) at ./Base.jl:380  
[7] include at ./Base.jl:368 [inlined]  
[8] include(::String) at /home/caleb/.julia/packages/RecursiveFactorization/5HUbe/src/RecursiveFactorization.jl:1  
[9] top-level scope at /home/caleb/.julia/packages/RecursiveFactorization/5HUbe/src/RecursiveFactorization.jl:3  
[10] include(::Function, ::Module, ::String) at ./Base.jl:380  
[11] include(::Module, ::String) at ./Base.jl:368  
[12] top-level scope at none:2  
[13] eval at ./boot.jl:331 [inlined]  
[14] eval(::Expr) at ./client.jl:467  
[15] top-level scope at ./none:3  
in expression starting at /home/caleb/.julia/packages/RecursiveFactorization/5HUbe/src/lu.jl:187  
in expression starting at /home/caleb/.julia/packages/RecursiveFactorization/5HUbe/src/lu.jl:186  
in expression starting at /home/caleb/.julia/packages/RecursiveFactorization/5HUbe/src/RecursiveFactorization.jl:3  
ERROR: LoadError: Failed to precompile RecursiveFactorization [f2c3362d-daeb-58d1-803e-2bc74f2840b4] to /home/caleb/.julia/compiled/v1.5/RecursiveFactorization/tEwl6\_O5PN9.ji.  
Stacktrace:  
[1] error(::String) at ./error.jl:33  
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305  
[3] \_require(::Base.PkgId) at ./loading.jl:1030  
[4] require(::Base.PkgId) at ./loading.jl:928  
[5] require(::Module, ::Symbol) at ./loading.jl:923  
[6] include(::Function, ::Module, ::String) at ./Base.jl:380  
[7] include(::Module, ::String) at ./Base.jl:368  
[8] top-level scope at none:2  
[9] eval at ./boot.jl:331 [inlined]  
[10] eval(::Expr) at ./client.jl:467  
[11] top-level scope at ./none:3  
in expression starting at /home/caleb/.julia/packages/NonlinearSolve/37aUT/src/NonlinearSolve.jl:13  
ERROR: LoadError: Failed to precompile NonlinearSolve [8913a72c-1f9b-4ce2-8d82-65094dcecaec] to /home/caleb/.julia/compiled/v1.5/NonlinearSolve/8YWaI\_O5PN9.ji.  
Stacktrace:  
[1] error(::String) at ./error.jl:33  
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305  
[3] \_require(::Base.PkgId) at ./loading.jl:1030  
[4] require(::Base.PkgId) at ./loading.jl:928  
[5] require(::Module, ::Symbol) at ./loading.jl:923  
[6] include(::Function, ::Module, ::String) at ./Base.jl:380  
[7] include(::Module, ::String) at ./Base.jl:368  
[8] top-level scope at none:2  
[9] eval at ./boot.jl:331 [inlined]  
[10] eval(::Expr) at ./client.jl:467  
[11] top-level scope at ./none:3  
in expression starting at /home/caleb/.julia/packages/Bijectors/LmARY/src/Bijectors.jl:39  
ERROR: LoadError: Failed to precompile Bijectors [76274a88-744f-5084-9051-94815aaf08c4] to /home/caleb/.julia/compiled/v1.5/Bijectors/39uFz\_O5PN9.ji.  
Stacktrace:  
[1] error(::String) at ./error.jl:33  
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305  
[3] \_require(::Base.PkgId) at ./loading.jl:1030  
[4] require(::Base.PkgId) at ./loading.jl:928  
[5] require(::Module, ::Symbol) at ./loading.jl:923  
[6] include(::Function, ::Module, ::String) at ./Base.jl:380  
[7] include(::Module, ::String) at ./Base.jl:368  
[8] top-level scope at none:2  
[9] eval at ./boot.jl:331 [inlined]  
[10] eval(::Expr) at ./client.jl:467  
[11] top-level scope at ./none:3  
in expression starting at /home/caleb/.julia/packages/Turing/y0DW3/src/Turing.jl:4  
ERROR: Failed to precompile Turing [fce5fe82-541a-59a6-adf8-730c64b5f9a0] to /home/caleb/.julia/compiled/v1.5/Turing/gm4QC\_O5PN9.ji.  
Stacktrace:  
[1] error(::String) at ./error.jl:33  
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305  
[3] \_require(::Base.PkgId) at ./loading.jl:1030  
[4] require(::Base.PkgId) at ./loading.jl:928  
[5] require(::Module, ::Symbol) at ./loading.jl:923

---

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [December 17, 2021, 9:39pm UTC](https://discourse.julialang.org/t/failed-to-precompile-the-turing-package/73283/2 "2021-12-17T21:39:34Z")

</div>

Can you please include the version of Julia and the package version using the command below?

`] st`

---

<div class="post-metadata">

### Author: ![joekang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joekang/32/32010_2.png) [@joekang](https://discourse.julialang.org/u/joekang)
#### Post date: [December 17, 2021, 10:02pm UTC](https://discourse.julialang.org/t/failed-to-precompile-the-turing-package/73283/3 "2021-12-17T22:02:43Z")

</div>

Sure, here it is:

(@v1.5) pkg\> st  
Status `~/.julia/environments/v1.5/Project.toml`  
[593b3428] CmdStan v6.2.0  
[1b08a953] Dash v0.1.4  
[1b08a953] DashCoreComponents v1.16.0  
[1b08a953] DashHtmlComponents v1.1.3  
[1b08a953] DashTable v4.11.3  
[a93c6f00] DataFrames v1.0.2  
[31a5f54b] Debugger v0.6.7  
[31c24e10] Distributions v0.24.8  
[86f7a689] NamedArrays v0.9.5  
[6f49c342] RCall v0.13.12  
[682df890] Stan v6.4.8  
[2913bbd2] StatsBase v0.33.2  
[f3b207a7] StatsPlots v0.14.29  
[fd094767] Suppressor v0.2.0  
[fce5fe82] Turing v0.17.4  
[9a3f8284] Random

---

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [December 17, 2021, 10:09pm UTC](https://discourse.julialang.org/t/failed-to-precompile-the-turing-package/73283/4 "2021-12-17T22:09:02Z")

</div>

Have you tried the most recent version of Turing (0.19.2)? Sometimes updating helps.

`] update`

---

<div class="post-metadata">

### Author: ![joekang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joekang/32/32010_2.png) [@joekang](https://discourse.julialang.org/u/joekang)
#### Post date: [December 17, 2021, 10:14pm UTC](https://discourse.julialang.org/t/failed-to-precompile-the-turing-package/73283/5 "2021-12-17T22:14:28Z")

</div>

Thank you, Christopher. I followed your advice, and it seems to have little different errors:

julia\> using Turing  
[Info: Precompiling Turing [fce5fe82-541a-59a6-adf8-730c64b5f9a0]  
WARNING: Method definition frule(Any, DataType, Real) in module ChainRules at /home/caleb/.julia/packages/ChainRules/kkDLd/src/rulesets/Base/base.jl:34 overwritten at /home/caleb/.julia/packages/ChainRules/kkDLd/src/rulesets/Base/base.jl:35.  
\*\* incremental compilation may be fatally broken for this module \*\*

WARNING: Method definition rrule(DataType, Real) in module ChainRules at /home/caleb/.julia/packages/ChainRules/kkDLd/src/rulesets/Base/base.jl:34 overwritten at /home/caleb/.julia/packages/ChainRules/kkDLd/src/rulesets/Base/base.jl:35.  
\*\* incremental compilation may be fatally broken for this module \*\*

WARNING: Method definition frule(Any, DataType, Real) in module ChainRules at /home/caleb/.julia/packages/ChainRules/kkDLd/src/rulesets/Base/base.jl:35 overwritten at /home/caleb/.julia/packages/ChainRules/kkDLd/src/rulesets/Base/base.jl:36.  
\*\* incremental compilation may be fatally broken for this module \*\*

WARNING: Method definition rrule(DataType, Real) in module ChainRules at /home/caleb/.julia/packages/ChainRules/kkDLd/src/rulesets/Base/base.jl:35 overwritten at /home/caleb/.julia/packages/ChainRules/kkDLd/src/rulesets/Base/base.jl:36.  
\*\* incremental compilation may be fatally broken for this module \*\*

ERROR: LoadError: LoadError: UndefVarError: HasReverseMode not defined  
Stacktrace:  
[1] top-level scope at /home/caleb/.julia/packages/ChainRules/kkDLd/src/rulesets/Base/mapreduce.jl:50  
[2] include(::Function, ::Module, ::String) at ./Base.jl:380  
[3] include at ./Base.jl:368 [inlined]  
[4] include(::String) at /home/caleb/.julia/packages/ChainRules/kkDLd/src/ChainRules.jl:1  
[5] top-level scope at /home/caleb/.julia/packages/ChainRules/kkDLd/src/ChainRules.jl:37  
[6] include(::Function, ::Module, ::String) at ./Base.jl:380  
[7] include(::Module, ::String) at ./Base.jl:368  
[8] top-level scope at none:2  
[9] eval at ./boot.jl:331 [inlined]  
[10] eval(::Expr) at ./client.jl:467  
[11] top-level scope at ./none:3  
in expression starting at /home/caleb/.julia/packages/ChainRules/kkDLd/src/rulesets/Base/mapreduce.jl:50  
in expression starting at /home/caleb/.julia/packages/ChainRules/kkDLd/src/ChainRules.jl:37  
ERROR: LoadError: Failed to precompile ChainRules [082447d4-558c-5d27-93f4-14fc19e9eca2] to /home/caleb/.julia/compiled/v1.5/ChainRules/AzGmQ\_O5PN9.ji.  
Stacktrace:  
[1] error(::String) at ./error.jl:33  
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305  
[3] \_require(::Base.PkgId) at ./loading.jl:1030  
[4] require(::Base.PkgId) at ./loading.jl:928  
[5] require(::Module, ::Symbol) at ./loading.jl:923  
[6] include(::Function, ::Module, ::String) at ./Base.jl:380  
[7] include(::Module, ::String) at ./Base.jl:368  
[8] top-level scope at none:2  
[9] eval at ./boot.jl:331 [inlined]  
[10] eval(::Expr) at ./client.jl:467  
[11] top-level scope at ./none:3  
in expression starting at /home/caleb/.julia/packages/DistributionsAD/yw5cH/src/DistributionsAD.jl:3  
ERROR: LoadError: Failed to precompile DistributionsAD [ced4e74d-a319-5a8a-b0ac-84af2272839c] to /home/caleb/.julia/compiled/v1.5/DistributionsAD/mhHYG\_O5PN9.ji.  
Stacktrace:  
[1] error(::String) at ./error.jl:33  
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305  
[3] \_require(::Base.PkgId) at ./loading.jl:1030  
[4] require(::Base.PkgId) at ./loading.jl:928  
[5] require(::Module, ::Symbol) at ./loading.jl:923  
[6] include(::Function, ::Module, ::String) at ./Base.jl:380  
[7] include(::Module, ::String) at ./Base.jl:368  
[8] top-level scope at none:2  
[9] eval at ./boot.jl:331 [inlined]  
[10] eval(::Expr) at ./client.jl:467  
[11] top-level scope at ./none:3  
in expression starting at /home/caleb/.julia/packages/Turing/VGHSc/src/Turing.jl:4  
ERROR: Failed to precompile Turing [fce5fe82-541a-59a6-adf8-730c64b5f9a0] to /home/caleb/.julia/compiled/v1.5/Turing/gm4QC\_O5PN9.ji.  
Stacktrace:  
[1] error(::String) at ./error.jl:33  
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1305  
[3] \_require(::Base.PkgId) at ./loading.jl:1030  
[4] require(::Base.PkgId) at ./loading.jl:928  
[5] require(::Module, ::Symbol) at ./loading.jl:923

---

<div class="post-metadata">

### Author: ![joekang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joekang/32/32010_2.png) [@joekang](https://discourse.julialang.org/u/joekang)
#### Post date: [December 17, 2021, 10:47pm UTC](https://discourse.julialang.org/t/failed-to-precompile-the-turing-package/73283/6 "2021-12-17T22:47:04Z")

</div>

I just restarted julia and Turing is successfully working now. Thank you, Christopher!

---

<div class="post-metadata">

### Author: ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)
#### Post date: [December 17, 2021, 11:01pm UTC](https://discourse.julialang.org/t/failed-to-precompile-the-turing-package/73283/7 "2021-12-17T23:01:11Z")

</div>

I’m glad that helped. If you run into more issues in the future, you might consider using project specific environments.
