安装FFTW显示错误

各位大神好,近来想用julia做一些变分算法的研究,但是安装FFTW显示错误。下面是详细信息,求教了。

julia版本信息
Julia Version 1.3.1
Commit 2d5741174c (2019-12-30 21:36 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core™ i5-8300H CPU @ 2.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)

pkg状态
Pkg.status()
Status C:\Users\inrm\.julia\environments\v1.3\Project.toml
[e0fc9d43] PkgMirrors v1.3.0 #v1.3.0 (https://mirrors.ustc.edu.cn/julia/PkgMirrors.jl.git)

报错
Pkg.add(“FFTW”)
Updating registry at C:\Users\inrm\.julia\registries\General
Updating git-repo https://github.com/JuliaRegistries/General.git
Resolving package versions…
ERROR: Unable to automatically install ‘IntelOpenMP’ from ‘C:\Users\inrm.julia\packages\IntelOpenMP_jll\hsAKN\Artifacts.toml’
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] #ensure_artifact_installed#42(::Pkg.BinaryPlatforms.Platform, ::Bool, ::typeof(Pkg.Artifacts.ensure_artifact_installed), ::String, ::Dict{String,Any}, ::String) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\Artifacts.jl:873
[3] (::Pkg.Artifacts.var"#kw##ensure_artifact_installed")(::NamedTuple{(:platform, :verbose),Tuple{Pkg.BinaryPlatforms.Windows,Bool}}, ::typeof(Pkg.Artifacts.ensure_artifact_installed), ::String, ::Dict{String,Any}, ::String) at .\none:0
[4] #ensure_all_artifacts_installed#43(::Pkg.BinaryPlatforms.Platform, ::Nothing, ::Bool, ::Bool, ::typeof(Pkg.Artifacts.ensure_all_artifacts_installed), ::String) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\Artifacts.jl:919
[5] #ensure_all_artifacts_installed at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\Operations.jl:0 [inlined]
[6] #download_artifacts#78(::Pkg.BinaryPlatforms.Windows, ::Bool, ::typeof(Pkg.Operations.download_artifacts), ::Array{String,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\Operations.jl:580
[7] #download_artifacts at .\none:0 [inlined]
[8] #download_artifacts#73(::Pkg.BinaryPlatforms.Windows, ::Bool, ::typeof(Pkg.Operations.download_artifacts), ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\Operations.jl:570
[9] (::Pkg.Operations.var"#kw##download_artifacts")(::NamedTuple{(:platform,),Tuple{Pkg.BinaryPlatforms.Windows}}, ::typeof(Pkg.Operations.download_artifacts), ::Array{Pkg.Types.PackageSpec,1}) at .\none:0
[10] #add#112(::Bool, ::Pkg.BinaryPlatforms.Windows, ::typeof(Pkg.Operations.add), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\Operations.jl:1017
[11] #add at .\none:0 [inlined]
[12] #add#25(::Bool, ::Pkg.BinaryPlatforms.Windows, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.add), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:102
[13] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:72
[14] #add#24 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:69 [inlined]
[15] add at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:69 [inlined]
[16] #add#21 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:67 [inlined]
[17] add at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:67 [inlined]
[18] #add#20(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Pkg.API.add), ::String) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:66
[19] add(::String) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\API.jl:66
[20] top-level scope at REPL[6]:1

这个主要是网络原因导致的,PkgMirrors并没有镜像二进制依赖,需要挂代理,或者尝试1.4版本的PKG_SERVER Julia 1.4-Dev Pkg服务器使用测试 - #8

确实如此,用代理之后好了,
谢谢!

您好! FFTW已经安装成功了,但是不能使用。还是请教一下:

julia> Pkg.build(“FFTW”)
Building FFTW → C:\Users\inrm\.julia\packages\FFTW\qqcBj\deps\build.log
false

julia> using FFTW
[ Info: Precompiling FFTW [7a1cc6ca-52ef-59f5-83cd-3a7055c09341]
ERROR: LoadError: LoadError: InitError: Unable to automatically install ‘MKL’ from ‘C:\Users\inrm.julia\packages\MKL_jll\AwbKa\Artifacts.toml’
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] #ensure_artifact_installed#42(::Pkg.BinaryPlatforms.Platform, ::Bool, ::typeof(Pkg.Artifacts.ensure_artifact_installed), ::String, ::Dict{String,Any}, ::String) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\Artifacts.jl:873
[3] (::Pkg.Artifacts.var"#kw##ensure_artifact_installed")(::NamedTuple{(:platform,),Tuple{Pkg.BinaryPlatforms.Windows}}, ::typeof(Pkg.Artifacts.ensure_artifact_installed), ::String, ::Dict{String,Any}, ::String) at .\none:0
[4] do_artifact_str(::String, ::Dict{String,Any}, ::String, ::Module) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\Artifacts.jl:983
[5] #invokelatest#1 at .\essentials.jl:709 [inlined]
[6] invokelatest at .\essentials.jl:708 [inlined]
[7] init() at C:\Users\inrm.julia\packages\MKL_jll\AwbKa\src\wrappers\x86_64-w64-mingw32.jl:42
[8] _include_from_serialized(::String, ::Array{Any,1}) at .\loading.jl:692
[9] _require_search_from_serialized(::Base.PkgId, ::String) at .\loading.jl:776
[10] _require(::Base.PkgId) at .\loading.jl:1001
[11] require(::Base.PkgId) at .\loading.jl:922
[12] require(::Module, ::Symbol) at .\loading.jl:917
[13] include at .\boot.jl:328 [inlined]
[14] include_relative(::Module, ::String) at .\loading.jl:1105
[15] include at .\Base.jl:31 [inlined]
[16] include(::String) at C:\Users\inrm.julia\packages\FFTW\qqcBj\src\FFTW.jl:1
[17] top-level scope at C:\Users\inrm.julia\packages\FFTW\qqcBj\src\FFTW.jl:20
[18] include at .\boot.jl:328 [inlined]
[19] include_relative(::Module, ::String) at .\loading.jl:1105
[20] include(::Module, ::String) at .\Base.jl:31
[21] top-level scope at none:2
[22] eval at .\boot.jl:330 [inlined]
[23] eval(::Expr) at .\client.jl:425
[24] top-level scope at .\none:3
during initialization of module MKL_jll
in expression starting at C:\Users\inrm.julia\packages\FFTW\qqcBj\deps\deps.jl:1
in expression starting at C:\Users\inrm.julia\packages\FFTW\qqcBj\src\FFTW.jl:19
ERROR: Failed to precompile FFTW [7a1cc6ca-52ef-59f5-83cd-3a7055c09341] to C:\Users\inrm.julia\compiled\v1.3\FFTW\PvIn2_N7aPQ.ji.
Stacktrace:
[1] error(::String) at .\error.jl:33
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1283
[3] _require(::Base.PkgId) at .\loading.jl:1024
[4] require(::Base.PkgId) at .\loading.jl:922
[5] require(::Module, ::Symbol) at .\loading.jl:917

这大概是因为网络原因导致一些依赖在build过程没有下载下来的原因,需要挂代理之后重新build: ] build

感谢你的建议!这个还是有问题,我挂了代理:build可以成功,using的报错还是3楼那个样子。

Hmmm… 不是很清楚… 试试看重装MKL_jll? 看看其他人有没有遇到过这个问题

还有一种办法是用早一点的版本可能有效

(v1.3) pkg> add FFTW@1.1
 Resolving package versions...
  Updating `~/.julia/environments/v1.3/Project.toml`
  [7a1cc6ca] ↓ FFTW v1.2.0 ⇒ v1.1.0
  Updating `~/.julia/environments/v1.3/Manifest.toml`
  [7a1cc6ca] ↓ FFTW v1.2.0 ⇒ v1.1.0
  [f5851436] - FFTW_jll v3.3.9+3

解决了。在挂代理情况下,把.julia清空一次,重新安装FFTW就好了。再次感谢~ :nerd_face:

1 个赞