Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to precompile Zygote #1455

Closed
diret47 opened this issue Sep 10, 2023 · 2 comments
Closed

Failed to precompile Zygote #1455

diret47 opened this issue Sep 10, 2023 · 2 comments

Comments

@diret47
Copy link

diret47 commented Sep 10, 2023

There is something wrong when I am using Zygote, under Julia version 1.9.2. What’s the reason and how can I fix this? Here are the error report:

using Zygote
[ Info: Precompiling Zygote [e88e6eb3-aa80-5325-afca-941959d7151f]
ERROR: LoadError: SystemError: opening file "C:\\Users\\ZXM\\.julia\\packages\\NNlib\\FAI3o\\deps\\deps.jl": No such file or directory
Stacktrace:
  [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
    @ Base .\error.jl:176
  [2] #systemerror#82
    @ .\error.jl:175 [inlined]
  [3] systemerror
    @ .\error.jl:175 [inlined]
  [4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing)
    @ Base .\iostream.jl:293
  [5] open
    @ .\iostream.jl:275 [inlined]
  [6] open(f::Base.var"#418#419"{String}, args::String; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base .\io.jl:393
  [7] open
    @ .\io.jl:392 [inlined]
  [8] read
    @ .\io.jl:473 [inlined]
  [9] _include(mapexpr::Function, mod::Module, _path::String)
    @ Base .\loading.jl:1959
 [10] include(mod::Module, _path::String)
    @ Base .\Base.jl:457
 [11] include(x::String)
    @ NNlib C:\Users\ZXM\.julia\packages\NNlib\FAI3o\src\NNlib.jl:1
 [12] top-level scope
    @ C:\Users\ZXM\.julia\packages\NNlib\FAI3o\src\NNlib.jl:8
 [13] include
    @ .\Base.jl:457 [inlined]
 [14] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
    @ Base .\loading.jl:2049
 [15] top-level scope
    @ stdin:3
in expression starting at C:\Users\ZXM\.julia\packages\NNlib\FAI3o\src\NNlib.jl:1
in expression starting at stdin:3
ERROR: LoadError: Failed to precompile NNlib [872c559c-99b0-510c-b3b7-b6c96a88d5cd] to "C:\\Users\\ZXM\\.julia\\compiled\\v1.9\\NNlib\\jl_E7F3.tmp".
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base .\loading.jl:2300
  [3] compilecache
    @ .\loading.jl:2167 [inlined]
  [4] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1805
  [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1660
  [6] macro expansion
    @ .\loading.jl:1648 [inlined]
  [7] macro expansion
    @ .\lock.jl:267 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1611
  [9] include(mod::Module, _path::String)
    @ Base .\Base.jl:457
 [10] include(x::String)
    @ Zygote C:\Users\ZXM\.julia\packages\Zygote\YeCEW\src\Zygote.jl:1
 [11] top-level scope
    @ C:\Users\ZXM\.julia\packages\Zygote\YeCEW\src\Zygote.jl:29
 [12] include
    @ .\Base.jl:457 [inlined]
 [13] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
    @ Base .\loading.jl:2049
 [14] top-level scope
    @ stdin:3
in expression starting at C:\Users\ZXM\.julia\packages\Zygote\YeCEW\src\lib\broadcast.jl:17
in expression starting at C:\Users\ZXM\.julia\packages\Zygote\YeCEW\src\Zygote.jl:1
in expression starting at stdin:3
ERROR: Failed to precompile Zygote [e88e6eb3-aa80-5325-afca-941959d7151f] to "C:\\Users\\ZXM\\.julia\\compiled\\v1.9\\Zygote\\jl_C131.tmp".
Stacktrace:
 [1] error(s::String)
   @ Base .\error.jl:35
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
   @ Base .\loading.jl:2300
 [3] compilecache
   @ .\loading.jl:2167 [inlined]
 [4] _require(pkg::Base.PkgId, env::String)
   @ Base .\loading.jl:1805
 [5] _require_prelocked(uuidkey::Base.PkgId, env::String)
   @ Base .\loading.jl:1660
 [6] macro expansion
   @ .\loading.jl:1648 [inlined]
 [7] macro expansion
   @ .\lock.jl:267 [inlined]
 [8] require(into::Module, mod::Symbol)
   @ Base .\loading.jl:1611
@ToucheSir
Copy link
Member

I suspect something is either wrong with your environment or your Julia install. Can you try adding just Zygote to a brand new environment and see if the error still occurs?

@diret47
Copy link
Author

diret47 commented Sep 15, 2023

Thx for your response. You're definitely correct and it works well in empty environment. I guess Zygote conflicts with some old version packages in my path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants