Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to resolve: "resolving package versions" in Julia?

I am new to the programming language Julia. I ran a few mixed models using the MixedModels package. Then, i wanted to run some average marginal effects using the Effects package. However, i get an error (see below).

To solve this issue, i tried to update all packages by using Pkg.update(). Then, i tried to install a particular version of the Effects package by using Pkg.rm("Effects") Pkg.add("Effects", v"0.1.4"). However, none of these options solved the issue. Could someone point out to me please what am i doing wrong?

Pkg.add("Effects")

    Resolving package versions...
Unsatisfiable requirements detected for package Effects [8f03c58b]:
 Effects [8f03c58b] log:
 ├─possible versions are: 0.1.0-0.1.4 or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.1.4
 └─restricted by julia compatibility requirements to versions: uninstalled — no versions left

Stacktrace:
 [1] propagate_constraints!(::Pkg.Resolve.Graph, ::Set{Int64}; log_events::Bool) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Resolve/graphtype.jl:1005
 [2] propagate_constraints! at /Users/julia/buildbot/worker/package_macos64/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 /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Resolve/graphtype.jl:1460
 [4] simplify_graph! at /Users/julia/buildbot/worker/package_macos64/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 /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:375
 [6] targeted_resolve at /Users/julia/buildbot/worker/package_macos64/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 /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:1100
 [8] _resolve at /Users/julia/buildbot/worker/package_macos64/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.MacOS) at /Users/julia/buildbot/worker/package_macos64/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.MacOS, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:188
 [11] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:139
 [12] #add#21 at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:67 [inlined]
 [13] add at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:67 [inlined]
 [14] #add#20 at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:66 [inlined]
 [15] add at /Users/julia/buildbot/worker/package_macos64/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 /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:65
 [17] add(::String) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:65
 [18] top-level scope at In[216]:1
 [19] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1091

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

It looks like you are using Julia version 1.5, but all existing versions of the Effects package require at least Julia version 1.6 (see Effects/Compat.toml). If you can, you should upgrade Julia to 1.6 since that is (at the time of writing) the supported stable version.


To explain the error message a bit:

Effects [8f03c58b] log:
├─possible versions are: 0.1.0-0.1.4 or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.1.4
└─restricted by julia compatibility requirements to versions: uninstalled — no versions left

The resolver starts with all existing versions as options (0.1.0 – 0.1.4) including the option to not have the package installed at all (uninstalled).

The second line filters out the uninstalled option since you are requesting it to be installed. * is a version wildcard which just means that you have not requested a specific version to be installed.

The third line is then causing the error, due to requirements on the Julia version all the remaining options are filtered out and you get no versions left, i.e. no more remaining options.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading