gpt4 book ai didi

julia - 尝试在 Julia 中添加 Plots 包时,为什么会出现 "Unsatisfiable requirements detected for package HTTP"错误?

转载 作者:行者123 更新时间:2023-12-04 01:12:37 24 4
gpt4 key购买 nike

我正在使用 Julia v1.5.2 并使用此代码添加 Plots 包

import Pkg
Pkg.add("Plots")
我收到下面给出的错误消息。
我尝试重新安装 Julia 并尝试使用其他稳定版本 (v1.0),但我仍然收到相同类型的错误消息。我什至尝试使用 Pkg 管理器而不是使用 import Pkg ,但似乎也没什么区别。
ERROR: Unsatisfiable requirements detected for package HTTP [cd3eb016]:
HTTP [cd3eb016] log:
├─HTTP [cd3eb016] has no known versions!
└─found to have no compatible versions left with Pluto [c3e4b0f8]
└─Pluto [c3e4b0f8] log:
├─possible versions are: [0.2.0, 0.3.0-0.3.6, 0.4.0-0.4.3, 0.5.0-0.5.21, 0.6.0-0.6.4, 0.7.0-0.7.10, 0.8.0-0.8.10, 0.9.0-0.9.11, 0.10.0-0.10.13, 0.11.0-0.11.14, 0.12.0-0.12.3] or uninstalled
└─restricted to versions * by an explicit requirement, leaving only versions [0.2.0, 0.3.0-0.3.6, 0.4.0-0.4.3, 0.5.0-0.5.21, 0.6.0-0.6.4, 0.7.0-0.7.10, 0.8.0-0.8.10, 0.9.0-0.9.11, 0.10.0-0.10.13, 0.11.0-0.11.14, 0.12.0-0.12.3]
Stacktrace:
[1] propagate_constraints!(::Pkg.Resolve.Graph, ::Set{Int64}; log_events::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Resolve\graphtype.jl:1005
[2] propagate_constraints! at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Resolve\graphtype.jl:946 [inlined] (repeats 2 times)
[3] simplify_graph!(::Pkg.Resolve.Graph, ::Set{Int64}; clean_graph::Bool) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Resolve\graphtype.jl:1460
[4] simplify_graph! at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Resolve\graphtype.jl:1460 [inlined] (repeats 2 times)
[5] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:375
[6] targeted_resolve at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1114 [inlined]
[7] tiered_resolve(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1100
[8] _resolve at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1120 [inlined]
[9] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Windows) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1135
[10] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Windows, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:188
[11] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:139
[12] #add#21 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:67 [inlined]
[13] add at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:67 [inlined]
[14] #add#20 at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:66 [inlined]
[15] add at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:66 [inlined]
[16] add(::String; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:65
[17] add(::String) at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:65
[18] top-level scope at REPL[19]:1

最佳答案

尝试删除 Pluto

using Pkg
pkg"rm Pluto"
pkg"add Plots"
然后更新包:
pkg"update"
我现在也会尝试明确安装 Http并检查它的版本:
pkg"add HTTP"
pkg"status HTTP"
冥王星似乎至少需要 HTTP版本 0.8.8这看起来没什么特别的。所以现在你应该可以安装回 Pluto
pkg"add Pluto"
如果有什么问题,请写出来。可以肯定的是 Pluto 正在与 Plots 一起工作。这是我的包裹状态(您可以提供类似的信息):
julia> Pkg.status.(["Pluto","HTTP","Plots"]);
Status `C:\JuliaPkg\Julia1.5.2\environments\v1.5\Project.toml`
[c3e4b0f8] Pluto v0.12.3
Status `C:\JuliaPkg\Julia1.5.2\environments\v1.5\Project.toml`
[cd3eb016] HTTP v0.8.19
Status `C:\JuliaPkg\Julia1.5.2\environments\v1.5\Project.toml`
[91a5bcdd] Plots v1.6.9
有时其他一些包可能会抑制所有版本。

关于julia - 尝试在 Julia 中添加 Plots 包时,为什么会出现 "Unsatisfiable requirements detected for package HTTP"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64359283/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com