Julia Distributions软件包安装问题

时间:2019-09-30 13:35:06

标签: julia

我希望在Julia中使用Distributions软件包,但无法达到第一手的要求。当我尝试add ing和using包裹时,会发生以下情况:

(v1.1) pkg> add Distributions
  Updating registry at `C:\Users\Philip\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
  Updating `C:\Users\Philip\.julia\environments\v1.1\Project.toml`
 [no changes]
  Updating `C:\Users\Philip\.julia\environments\v1.1\Manifest.toml`
 [no changes]

julia> using Distributions
[ Info: Precompiling Distributions [31c24e10-a181-5473-b8eb-7969acd0382f]
ERROR: LoadError: InitError: C:\Users\Philip\.julia\packages\SpecialFunctions\fvheQ\deps\usr\bin\libopenspecfun.dll cannot be opened, Please re-run Pkg.build("fvheQ"), and restart Julia.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] check_deps() at C:\Users\Philip\.julia\packages\SpecialFunctions\fvheQ\deps\deps.jl:20
 [3] __init__() at C:\Users\Philip\.julia\packages\SpecialFunctions\fvheQ\src\SpecialFunctions.jl:12
 [4] _include_from_serialized(::String, ::Array{Any,1}) at .\loading.jl:633
 [5] _require_search_from_serialized(::Base.PkgId, ::String) at .\loading.jl:713
 [6] _require(::Base.PkgId) at .\loading.jl:937
 [7] require(::Base.PkgId) at .\loading.jl:858
 [8] require(::Module, ::Symbol) at .\loading.jl:853
 [9] include at .\boot.jl:326 [inlined]
 [10] include_relative(::Module, ::String) at .\loading.jl:1038
 [11] include(::Module, ::String) at .\sysimg.jl:29
 [12] top-level scope at none:2
 [13] eval at .\boot.jl:328 [inlined]
 [14] eval(::Expr) at .\client.jl:404
 [15] top-level scope at .\none:3
during initialization of module SpecialFunctions
in expression starting at C:\Users\Philip\.julia\packages\StatsFuns\2QE7p\src\StatsFuns.jl:6
ERROR: LoadError: Failed to precompile StatsFuns [4c63d2b9-4356-54db-8cca-17b64c39e42c] to C:\Users\Philip\.julia\compiled\v1.1\StatsFuns\530lR.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1197
 [3] _require(::Base.PkgId) at .\loading.jl:960
 [4] require(::Base.PkgId) at .\loading.jl:858
 [5] require(::Module, ::Symbol) at .\loading.jl:853
 [6] include at .\boot.jl:326 [inlined]
 [7] include_relative(::Module, ::String) at .\loading.jl:1038
 [8] include(::Module, ::String) at .\sysimg.jl:29
 [9] top-level scope at none:2
 [10] eval at .\boot.jl:328 [inlined]
 [11] eval(::Expr) at .\client.jl:404
 [12] top-level scope at .\none:3
in expression starting at C:\Users\Philip\.julia\packages\Distributions\tfkz4\src\Distributions.jl:3
ERROR: Failed to precompile Distributions [31c24e10-a181-5473-b8eb-7969acd0382f] to C:\Users\Philip\.julia\compiled\v1.1\Distributions\xILW0.ji.
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1197
 [3] _require(::Base.PkgId) at .\loading.jl:960
 [4] require(::Base.PkgId) at .\loading.jl:858
 [5] require(::Module, ::Symbol) at .\loading.jl:853

所以出了点问题,错误消息的第一行要求我Please re-run Pkg.build("fvheQ"), and restart Julia,但我认为语法是针对Julia 0.6的,而不是重新升级的Pkg REPL。

问题

  1. Julia 0.6命令Pkg.build("fvheQ")的更新版本是什么。我正在使用Julia 1.1.1。
  2. 到目前为止,我一直发现在Julia中添加软件包很顺利。如果问题不是很广泛,那么解决这样的软件包安装问题的最佳策略是什么?

1 个答案:

答案 0 :(得分:2)

这是错误打印中的错误。您实际上要运行Pkg.build("SpecialFunctions"),它应该重新下载共享库libopenspecfun