# ODE.jl: PolyCompat not defined

**URL:** <https://discourse.julialang.org/t/ode-jl-polycompat-not-defined/54332>\
**Category:** General Usage\
**Tags:** package, diffeq, ode\
**Created:** [January 31, 2021, 3:40pm UTC](https://discourse.julialang.org/t/ode-jl-polycompat-not-defined/54332 "2021-01-31T15:40:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Caio\_Machado](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/caio_machado/32/10391_2.png) [@Caio\_Machado](https://discourse.julialang.org/u/Caio_Machado)\
**Post date:** [January 31, 2021, 3:40pm UTC](https://discourse.julialang.org/t/ode-jl-polycompat-not-defined/54332/1 "2021-01-31T15:40:54Z")

</div>

Hi all,

I am trying to run ODE.jl in Julia 1.5, but I get the following error when loading the package. I have installed Polynomials using Pkg.add(). I know there are better solvers available in DifferentialEquations.jl, but I want to use ode45 to try to replicate some calculations that were done in Matlab.

> julia\> using Polynomials, ODE  
> [Info: Precompiling ODE [c030b06c-0b6d-57c2-b091-7029874bd033]  
> ERROR: LoadError: UndefVarError: PolyCompat not defined  
> Stacktrace:  
> [1] include(::Function, ::Module, ::String) at .\Base.jl:380  
> [2] include(::Module, ::String) at .\Base.jl:368  
> [3] top-level scope at none:2  
> [4] eval at .\boot.jl:331 [inlined]  
> [5] eval(::Expr) at .\client.jl:467  
> [6] top-level scope at .\none:3  
> in expression starting at C:\Users\caioh.julia\packages\ODE\foTmY\src\ODE.jl:7  
> ERROR: Failed to precompile ODE [c030b06c-0b6d-57c2-b091-7029874bd033] to C:\Users\caioh.julia\compiled\v1.5\ODE\yzDex\_OpTrA.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:** ![j\_verzani](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j_verzani/32/8551_2.png) [@j\_verzani](https://discourse.julialang.org/u/j_verzani)\
**Post date:** [January 31, 2021, 3:51pm UTC](https://discourse.julialang.org/t/ode-jl-polycompat-not-defined/54332/2 "2021-01-31T15:51:16Z")

</div>

You must have an older version of `Polynomials`. I think v0.6 and v0.7 (allowed in the Project.toml file of `ODE.jl`) don’t need to use `PolyCompat`.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [January 31, 2021, 6:25pm UTC](https://discourse.julialang.org/t/ode-jl-polycompat-not-defined/54332/3 "2021-01-31T18:25:46Z")

</div>

> [@Caio\_Machado](#):
>
> but I want to use ode45 to try to replicate some calculations that were done in Matlab.

The `ode45` there isn’t going to be all that similar. `DP5` of OrdinaryDiffEq.jl is going to be closer (to the original `dopri`).

---

<div class="post-metadata">

**Author:** ![Caio\_Machado](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/caio_machado/32/10391_2.png) [@Caio\_Machado](https://discourse.julialang.org/u/Caio_Machado)\
**Post date:** [February 6, 2021, 2:40pm UTC](https://discourse.julialang.org/t/ode-jl-polycompat-not-defined/54332/4 "2021-02-06T14:40:35Z")

</div>

Thanks! Indeed, DP5() was close enough.

---

<div class="post-metadata">

**Author:** ![Nick\_Matzke](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nick_matzke/32/34568_2.png) [@Nick\_Matzke](https://discourse.julialang.org/u/Nick_Matzke)\
**Post date:** [March 15, 2022, 8:31am UTC](https://discourse.julialang.org/t/ode-jl-polycompat-not-defined/54332/5 "2022-03-15T08:31:01Z")

</div>

My experience on this error message, for fellow future newbies who were confused like me – I had to remove the old versions of ODE and Polynomials from my package, then re-add them. I.e.:

]  
activate .  
rm Polynomials  
rm ODE  
(backspace)

(then I exited, re-started, came back)

]  
activate .  
add Polynomials  
add ODE  
(backspace)

To check versions before and after:

using Pkg  
Pkg.status(“Polynomials”)  
Pkg.status(“ODE”)
