我在JuliaV1.7.2中遇到了一个bug。
我正在尝试包含一个使用模块的util.jl文件。
该模块中的所有内容都运行良好(我已将其放入Pluto.jl笔记本中,并且所有操作都在运行)。
然而,当我尝试下面的代码行时,
using Pkg
Pkg.activate(joinpath(@__DIR__, "../../dev/"))
using Module我知道这个错误
Activating project at `~/Desktop/dev`
ERROR: LoadError: UndefVarError: libhdf5 not defined
Stacktrace:
[1] top-level scope
@ ~/.julia/packages/HDF5/pIJra/src/api_types.jl:119
[2] include(mod::Module, _path::String)
@ Base ./Base.jl:418
[3] include(x::String)
@ HDF5 ~/.julia/packages/HDF5/pIJra/src/HDF5.jl:1
[4] top-level scope
@ ~/.julia/packages/HDF5/pIJra/src/HDF5.jl:51
[5] include
@ ./Base.jl:418 [inlined]
[6] 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, UInt64}}, source::String)
@ Base ./loading.jl:1318
[7] top-level scope
@ none:1
[8] eval
@ ./boot.jl:373 [inlined]
[9] eval(x::Expr)
@ Base.MainInclude ./client.jl:453
[10] top-level scope
@ none:1
in expression starting at /Users/me/.julia/packages/HDF5/pIJra/src/api_types.jl:119
in expression starting at /Users/me/.julia/packages/HDF5/pIJra/src/HDF5.jl:1
ERROR: LoadError: Failed to precompile HDF5 [f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f] to /Users/me/.julia/compiled/v1.7/HDF5/jl_m27neP.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
@ Base ./loading.jl:1466
[3] compilecache(pkg::Base.PkgId, path::String)
@ Base ./loading.jl:1410
[4] _require(pkg::Base.PkgId)
@ Base ./loading.jl:1120
[5] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:1013
[6] require(into::Module, mod::Symbol)
@ Base ./loading.jl:997
[7] include
@ ./Base.jl:418 [inlined]
[8] 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, UInt64}}, source::String)
@ Base ./loading.jl:1318
[9] top-level scope
@ none:1
[10] eval
@ ./boot.jl:373 [inlined]
[11] eval(x::Expr)
@ Base.MainInclude ./client.jl:453
[12] top-level scope
@ none:1
in expression starting at /Users/me/Desktop/src/Module.jl:1但是,如果我只是试着
using HDF5我没什么问题。
我不明白为什么我可以很好地使用HDF5;我可以很好地运行模块中的所有东西;但是当我试图导入该模块时,我会遇到一个错误,说明HDF5有问题。有人能提供一些更多的洞察朱莉娅如何工作,可以使这个问题对我有意义吗?
发布于 2022-05-09 02:20:43
你是和罗塞塔一起跑还是和土生土长一起跑?如果是本机,您应该尝试1.8rc3,因为1.7在M1本机上有很多bug。
https://stackoverflow.com/questions/72095423
复制相似问题