# Missing functions in Zygote

**URL:** <https://discourse.julialang.org/t/missing-functions-in-zygote/75187>\
**Category:** New to Julia\
**Tags:** question, package\
**Created:** [January 25, 2022, 5:17pm UTC](https://discourse.julialang.org/t/missing-functions-in-zygote/75187 "2022-01-25T17:17:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsbyrnes](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jsbyrnes](https://discourse.julialang.org/u/jsbyrnes)\
**Post date:** [January 25, 2022, 5:17pm UTC](https://discourse.julialang.org/t/missing-functions-in-zygote/75187/1 "2022-01-25T17:17:39Z")

</div>

I am trying to use the jacobian functions in Zygote, but I can’t find them. In what has to be the dumbest questions ever posted here, there’s very little in Zygote for me. Heres the problem:

**julia\>** using Zygote

**julia\>** names(Zygote)

5-element Array{Symbol,1}:

Symbol(“@code\_grad”)

:Params

:Zygote

:gradient

:pullback

**julia\>** Zygote.withjacobian

**ERROR:** UndefVarError: withjacobian not defined

Stacktrace:

[1] **getproperty(** ::Module, ::Symbol **)** at **./Base.jl:26**

[2] top-level scope at **REPL[3]:1**

Here the Zygote API: [Utilities · Zygote](https://fluxml.ai/Zygote.jl/latest/utils/)

Where are the missing methods?

---

<div class="post-metadata">

**Author:** ![ToucheSir](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/touchesir/32/14411_2.png) [@ToucheSir](https://discourse.julialang.org/u/ToucheSir)\
**Post date:** [January 25, 2022, 5:46pm UTC](https://discourse.julialang.org/t/missing-functions-in-zygote/75187/2 "2022-01-25T17:46:15Z")

</div>

If I had to guess, you have a old version of Zygote installed. Anything under 0.6.20 or even 0.6.30 will probably not have those functions.

---

<div class="post-metadata">

**Author:** ![jsbyrnes](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jsbyrnes](https://discourse.julialang.org/u/jsbyrnes)\
**Post date:** [January 25, 2022, 5:53pm UTC](https://discourse.julialang.org/t/missing-functions-in-zygote/75187/3 "2022-01-25T17:53:43Z")

</div>

I got this on updating

**(@v1.5) pkg\>** update Zygote

**Updating** registry at `~/.julia/registries/General`

######################################################################## 100.0%

**Installed** StatsFuns ─ v0.9.15

**No Changes** to `~/.julia/environments/v1.5/Project.toml`

**Updating** `~/.julia/environments/v1.5/Manifest.toml`

[4c63d2b9] ↑ StatsFuns v0.9.14 ⇒ v0.9.15

**julia\>** using Zygote

**julia\>** names(Zygote)

5-element Array{Symbol,1}:

Symbol(“@code\_grad”)

:Params

:Zygote

:gradient

:pullback

**julia\>** Zygote.jacobian

**ERROR:** UndefVarError: jacobian not defined

Stacktrace:

[1] **getproperty(** ::Module, ::Symbol **)** at **./Base.jl:26**

[2] top-level scope at **REPL[6]:1**

---

<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:** [January 25, 2022, 6:03pm UTC](https://discourse.julialang.org/t/missing-functions-in-zygote/75187/4 "2022-01-25T18:03:46Z")

</div>

What is the output if you enter:

```julia
pkg> st

```

?

---

<div class="post-metadata">

**Author:** ![jsbyrnes](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jsbyrnes](https://discourse.julialang.org/u/jsbyrnes)\
**Post date:** [January 25, 2022, 6:34pm UTC](https://discourse.julialang.org/t/missing-functions-in-zygote/75187/5 "2022-01-25T18:34:25Z")

</div>

[e88e6eb3] Zygote v0.4.20

which clearly is not the version I need for the functions (didnt know about st, thank you so much!).  
Let me try updating Julia and seeing if “update Zygote” actually bumps up the version.

---

<div class="post-metadata">

**Author:** ![contradict](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@contradict](https://discourse.julialang.org/u/contradict)\
**Post date:** [January 25, 2022, 6:43pm UTC](https://discourse.julialang.org/t/missing-functions-in-zygote/75187/6 "2022-01-25T18:43:15Z")

</div>

It is more likely that some other package you have installed is holding Zygote back rather than the Julia executable being too old. Try updating all packages first:

```
pkg> up

```

If that doesn’t work, ask for the specific Zygote version you want and hopefully you will get an error describing the package that is holding it back:

```
pkg> add Zygote@0.6.34

```

---

<div class="post-metadata">

**Author:** ![jsbyrnes](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jsbyrnes](https://discourse.julialang.org/u/jsbyrnes)\
**Post date:** [January 25, 2022, 6:55pm UTC](https://discourse.julialang.org/t/missing-functions-in-zygote/75187/7 "2022-01-25T18:55:57Z")

</div>

I update Julia and it solved the problem (thanks everyone) - but to answer @contradict I went back to 1.5, did up and then add Zygote@0.6.34 and got this

ERROR: Unsatisfiable requirements detected for package Distributions [31c24e10]:  
Distributions [31c24e10] log:  
├─possible versions are: [0.16.0-0.16.4, 0.17.0, 0.18.0, 0.19.1-0.19.2, 0.20.0, 0.21.0-0.21.3, 0.21.5-0.21.12, 0.22.0-0.22.6, 0.23.0-0.23.12, 0.24.0-0.24.18, 0.25.0-0.25.41] or uninstalled  
├─restricted to versions 0.18-0.25 by CircStats [0643c194], leaving only versions [0.18.0, 0.19.1-0.19.2, 0.20.0, 0.21.0-0.21.3, 0.21.5-0.21.12, 0.22.0-0.22.6, 0.23.0-0.23.12, 0.24.0-0.24.18, 0.25.0-0.25.41]  
│ └─CircStats [0643c194] log:  
│ ├─possible versions are: 0.2.1 or uninstalled  
│ └─CircStats [0643c194] is fixed to version 0.2.1  
├─restricted by compatibility requirements with VectorizedRoutines [0e69188a] to versions: [0.16.0-0.16.4, 0.17.0, 0.18.0, 0.19.1-0.19.2, 0.20.0, 0.21.0-0.21.3, 0.21.5-0.21.12, 0.22.0-0.22.6, 0.23.0-0.23.12], leaving only versions: [0.18.0, 0.19.1-0.19.2, 0.20.0, 0.21.0-0.21.3, 0.21.5-0.21.12, 0.22.0-0.22.6, 0.23.0-0.23.12]  
│ └─VectorizedRoutines [0e69188a] log:  
│ ├─possible versions are: 0.1.0 or uninstalled  
│ └─restricted to versions \* by an explicit requirement, leaving only versions 0.1.0  
└─restricted by compatibility requirements with SpecialFunctions [276daf66] to versions: [0.24.4-0.24.18, 0.25.0-0.25.41] or uninstalled — no versions left  
└─SpecialFunctions [276daf66] log:  
├─possible versions are: [0.7.0-0.7.2, 0.8.0, 0.9.0, 0.10.0-0.10.3, 1.0.0, 1.1.0, 1.2.0-1.2.1, 1.3.0, 1.4.0-1.4.2, 1.5.0-1.5.1, 1.6.0-1.6.2, 1.7.0, 1.8.0-1.8.1, 2.0.0] or uninstalled  
├─restricted by compatibility requirements with ForwardDiff [f6369f11] to versions: [0.7.0-0.7.2, 0.8.0, 0.9.0, 0.10.0-0.10.3, 1.0.0, 1.1.0, 1.2.0-1.2.1, 1.3.0, 1.4.0-1.4.2, 1.5.0-1.5.1, 1.6.0-1.6.2, 1.7.0, 1.8.0-1.8.1, 2.0.0]  
│ └─ForwardDiff [f6369f11] log:  
│ ├─possible versions are: [0.9.0, 0.10.0-0.10.25] or uninstalled  
│ ├─restricted to versions \* by an explicit requirement, leaving only versions [0.9.0, 0.10.0-0.10.25]  
│ └─restricted by compatibility requirements with Zygote [e88e6eb3] to versions: 0.10.0-0.10.25  
│ └─Zygote [e88e6eb3] log:  
│ ├─possible versions are: [0.1.0, 0.2.0, 0.3.0-0.3.4, 0.4.0-0.4.22, 0.5.0-0.5.17, 0.6.0-0.6.34] or uninstalled  
│ └─restricted to versions 0.6.34 by an explicit requirement, leaving only versions 0.6.34  
├─restricted by compatibility requirements with Zygote [e88e6eb3] to versions: [1.6.0-1.6.2, 1.7.0, 1.8.0-1.8.1, 2.0.0]  
│ └─Zygote [e88e6eb3] log: see above  
└─restricted by compatibility requirements with AutoGrad [6710c13c] to versions: [0.7.0-0.7.2, 0.8.0, 0.9.0, 0.10.0-0.10.3, 1.0.0, 1.1.0, 1.2.0-1.2.1, 1.3.0, 1.4.0-1.4.2, 1.5.0-1.5.1, 1.6.0-1.6.2, 1.7.0, 1.8.0-1.8.1], leaving only versions: [1.6.0-1.6.2, 1.7.0, 1.8.0-1.8.1]  
└─AutoGrad [6710c13c] log:  
├─possible versions are: [1.0.0-1.0.1, 1.1.0-1.1.6, 1.2.0-1.2.4] or uninstalled  
└─restricted to versions \* by an explicit requirement, leaving only versions [1.0.0-1.0.1, 1.1.0-1.1.6, 1.2.0-1.2.4]
