Can't add Zygote in Julia 1.3

When I tried to add Zygote.jl into Julia 1.3, it reported the following issues.
Any ideas on how to solve it?
Thanks :slight_smile:

(v1.3) pkg> add Zygote
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Zygote [e88e6eb3]:
 Zygote [e88e6eb3] log:
 β”œβ”€possible versions are: [0.1.0, 0.2.0, 0.3.0-0.3.4, 0.4.0-0.4.1] or uninstalled
 β”œβ”€restricted to versions * by an explicit requirement, leaving only versions [0.1.0, 0.2.0, 0.3.0-0.3.4, 0.4.0-0.4.1]
 β”œβ”€restricted by compatibility requirements with FFTW [7a1cc6ca] to versions: [0.1.0, 0.2.0, 0.3.0-0.3.4] or uninstalled, leaving only versions: [0.1.0, 0.2.0, 0.3.0-0.3.4]
 β”‚ └─FFTW [7a1cc6ca] log:
 β”‚   β”œβ”€possible versions are: [0.1.0-0.1.2, 0.2.0-0.2.4, 0.3.0, 1.0.0-1.0.1, 1.1.0] or uninstalled
 β”‚   └─restricted to versions 0.3.0 by an explicit requirement, leaving only versions 0.3.0
 β”œβ”€restricted by compatibility requirements with ZygoteRules [700de1a5] to versions: [0.1.0, 0.2.0, 0.3.0-0.3.2, 0.4.0-0.4.1] or uninstalled, leaving only versions: [0.1.0, 0.2.0, 0.3.0-0.3.2]
 β”‚ └─ZygoteRules [700de1a5] log:
 β”‚   β”œβ”€possible versions are: 0.2.0 or uninstalled
 β”‚   └─ZygoteRules [700de1a5] is fixed to version 0.2.0
 β”œβ”€restricted by compatibility requirements with IRTools [7869d1d1] to versions: [0.1.0, 0.4.0-0.4.1] or uninstalled, leaving only versions: 0.1.0
 β”‚ └─IRTools [7869d1d1] log:
 β”‚   β”œβ”€possible versions are: [0.1.0-0.1.2, 0.2.0-0.2.3, 0.3.0] or uninstalled
 β”‚   └─restricted to versions 0.3.0 by an explicit requirement, leaving only versions 0.3.0
 └─restricted by compatibility requirements with NNlib [872c559c] to versions: [0.3.0-0.3.4, 0.4.0-0.4.1] or uninstalled β€” no versions left
   └─NNlib [872c559c] log:
     β”œβ”€possible versions are: [0.3.2, 0.4.0-0.4.3, 0.5.0, 0.6.0] or uninstalled
     └─restricted to versions 0.6.0 by an explicit requirement, leaving only versions 0.6.0

probably some package cache problem … with clean (Linux) Julia1.3 it is working.

docker run -it julia:1.3 /bin/bash
root@dc702f5a66fc:/# julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.3.0 (2019-11-26)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(v1.3) pkg> add Zygote
   Cloning default registries into `~/.julia`
   Cloning registry from "https://github.com/JuliaRegistries/General.git"
     Added registry `General` to `~/.julia/registries/General`
 Resolving package versions...
 Installed URIParser ──────────── v0.4.0
 Installed DiffResults ────────── v0.0.4
 Installed FFTW ───────────────── v1.1.0
 Installed NNlib ──────────────── v0.6.0
 Installed BinaryProvider ─────── v0.5.8
 Installed DataStructures ─────── v0.17.6
 Installed Zygote ─────────────── v0.4.1
 Installed StaticArrays ───────── v0.12.1
 Installed TimerOutputs ───────── v0.5.3
 Installed JSON ───────────────── v0.21.0
 Installed OrderedCollections ─── v1.1.0
 Installed MacroTools ─────────── v0.5.3
 Installed CommonSubexpressions ─ v0.2.0
 Installed SpecialFunctions ───── v0.8.0
 Installed Compat ─────────────── v2.2.0
 Installed Parsers ────────────── v0.3.10
 Installed NaNMath ────────────── v0.3.3
 Installed BinDeps ────────────── v0.8.10
 Installed DiffRules ──────────── v0.1.0
 Installed IRTools ────────────── v0.3.0
 Installed Requires ───────────── v0.5.2
 Installed VersionParsing ─────── v1.1.3
 Installed ForwardDiff ────────── v0.10.7
 Installed Conda ──────────────── v1.3.0
 Installed Reexport ───────────── v0.2.0
 Installed FillArrays ─────────── v0.8.2
 Installed ZygoteRules ────────── v0.2.0
 Installed AbstractFFTs ───────── v0.5.0
  Updating `~/.julia/environments/v1.3/Project.toml`
  [e88e6eb3] + Zygote v0.4.1
  Updating `~/.julia/environments/v1.3/Manifest.toml`
  [621f4979] + AbstractFFTs v0.5.0
  [9e28174c] + BinDeps v0.8.10
  [b99e7846] + BinaryProvider v0.5.8
  [bbf7d656] + CommonSubexpressions v0.2.0
  [34da2185] + Compat v2.2.0
  [8f4d0f93] + Conda v1.3.0
  [864edb3b] + DataStructures v0.17.6
  [163ba53b] + DiffResults v0.0.4
  [b552c78f] + DiffRules v0.1.0
  [7a1cc6ca] + FFTW v1.1.0
  [1a297f60] + FillArrays v0.8.2
  [f6369f11] + ForwardDiff v0.10.7
  [7869d1d1] + IRTools v0.3.0
  [682c06a0] + JSON v0.21.0
  [1914dd2f] + MacroTools v0.5.3
  [872c559c] + NNlib v0.6.0
  [77ba4419] + NaNMath v0.3.3
  [bac558e1] + OrderedCollections v1.1.0
  [69de0a69] + Parsers v0.3.10
  [189a3867] + Reexport v0.2.0
  [ae029012] + Requires v0.5.2
  [276daf66] + SpecialFunctions v0.8.0
  [90137ffa] + StaticArrays v0.12.1
  [a759f4b9] + TimerOutputs v0.5.3
  [30578b45] + URIParser v0.4.0
  [81def892] + VersionParsing v1.1.3
  [e88e6eb3] + Zygote v0.4.1
  [700de1a5] + ZygoteRules v0.2.0
  [2a0f44e3] + Base64 
  [ade2ca70] + Dates 
  [8bb1440f] + DelimitedFiles 
  [8ba89e20] + Distributed 
  [b77e0a4c] + InteractiveUtils 
  [76f85450] + LibGit2 
  [8f399da3] + Libdl 
  [37e2e46d] + LinearAlgebra 
  [56ddb016] + Logging 
  [d6f4376e] + Markdown 
  [a63ad114] + Mmap 
  [44cfe95a] + Pkg 
  [de0858da] + Printf 
  [3fa0cd96] + REPL 
  [9a3f8284] + Random 
  [ea8e919c] + SHA 
  [9e88b42a] + Serialization 
  [1a1011a3] + SharedArrays 
  [6462fe0b] + Sockets 
  [2f01184e] + SparseArrays 
  [10745b16] + Statistics 
  [8dfed614] + Test 
  [cf7118a7] + UUIDs 
  [4ec0a83e] + Unicode 
  Building Conda ───────────→ `~/.julia/packages/Conda/kLXeC/deps/build.log`
  Building FFTW ────────────→ `~/.julia/packages/FFTW/loJ3F/deps/build.log`
  Building SpecialFunctions β†’ `~/.julia/packages/SpecialFunctions/ne2iw/deps/build.log`

(v1.3) pkg> 

I’m not sure if there is a general solution to this type of problem. Sometimes it can be solved by removing the packages listed in your error messages, then adding Zygote, followed by adding back the packages you removed. But I would be interested in hearing if there is a better approach.

Can you post your pkg> status ?

Try updating FFTW - it looks like you have an old version. I got stuck because I had ArrayFire installed which required the very old FFTW.

Or you can try to update other packages listed in the output one at a time

Thx. I tried this and worked for me.

Thx. I tried directly update in Pkg before, but seems not work. Removing and reinstalling worked for me.

Probably be true. I remove and install the packages, and find can’t reproduce this issue.

1 Like

see: Is Pkg's dependency resolution order-dependent?

TLDR 1.4 will generally avoid this class of errors

4 Likes