1

I am adding package "DataFrameMacros". This results in error:

ERROR: Unsatisfiable requirements detected for package Compat [34da2185]:
 Compat [34da2185] log:
 ├─possible versions are: 1.0.0-4.4.0 or uninstalled
 ├─restricted by compatibility requirements with DataFrames [a93c6f00] to versions: 3.17.0-4.4.0
 │ └─DataFrames [a93c6f00] log:
 │   ├─possible versions are: 0.11.7-1.4.3 or uninstalled
 │   ├─restricted to versions * by an explicit requirement, leaving only versions 0.11.7-1.4.3
 │   └─restricted by compatibility requirements with DataFrameMacros [75880514] to versions: 1.0.0-1.4.3
 │     └─DataFrameMacros [75880514] log:
 │       ├─possible versions are: 0.1.0-0.4.0 or uninstalled
 │       └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.4.0
 └─restricted by compatibility requirements with Format [1fa38f19] to versions: 1.0.0-2.2.1 — no versions left
   └─Format [1fa38f19] log:
     ├─possible versions are: 0.7.0-1.3.2 or uninstalled
     └─restricted by compatibility requirements with BioStructures [de9282ab] to versions: 0.7.0-0.8.0
       └─BioStructures [de9282ab] log:
         ├─possible versions are: 0.3.0-1.2.1 or uninstalled
         └─restricted by compatibility requirements with Bio [3637df68] to versions: 0.3.0-0.4.0
           └─Bio [3637df68] log:
             ├─possible versions are: 1.0.0-1.0.1 or uninstalled
             └─restricted to versions * by an explicit requirement, leaving only versions 1.0.0-1.0.1
Stacktrace:
  [1] propagate_constraints!(graph::Pkg.Resolve.Graph, sources::Set{Int64}; log_events::Bool)
    @ Pkg.Resolve ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Resolve/graphtype.jl:1063
  [2] propagate_constraints! (repeats 2 times)
    @ ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Resolve/graphtype.jl:1000 [inlined]
  [3] simplify_graph!(graph::Pkg.Resolve.Graph, sources::Set{Int64}; clean_graph::Bool)
    @ Pkg.Resolve ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Resolve/graphtype.jl:1519
  [4] simplify_graph! (repeats 2 times)
    @ ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Resolve/graphtype.jl:1519 [inlined]
  [5] resolve_versions!(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, julia_version::VersionNumber)
    @ Pkg.Operations ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:335
  [6] targeted_resolve(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel, julia_version::VersionNumber)
    @ Pkg.Operations ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1154
  [7] tiered_resolve(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, julia_version::VersionNumber)
    @ Pkg.Operations ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1139
  [8] _resolve(io::Base.TTY, env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel, julia_version::VersionNumber)
    @ Pkg.Operations ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1160
  [9] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Set{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
    @ Pkg.Operations ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1176
 [10] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
    @ Pkg.API ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/API.jl:268
 [11] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/API.jl:149
 [12] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/API.jl:144
 [13] #add#27
    @ ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/API.jl:142 [inlined]
 [14] add
    @ ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/API.jl:142 [inlined]
 [15] #add#26
    @ ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/API.jl:141 [inlined]
 [16] add(pkg::String)
    @ Pkg.API ~/julia-1.7.0/share/julia/stdlib/v1.7/Pkg/src/API.jl:141
 [17] top-level scope
    @ REPL[1]:1

My packages status:

(@v1.7) pkg> status
      Status `~/.julia/environments/v1.7/Project.toml`
  [3637df68] Bio v1.0.1
  [336ed68f] CSV v0.8.5
  [159f3aea] Cairo v1.0.5
  [8be319e6] Chain v0.5.0
  [a93c6f00] DataFrames v0.21.8
  [31c24e10] Distributions v0.25.45
  [186bb1d3] Fontconfig v0.4.0
  [c91e804a] Gadfly v1.3.4
  [7073ff75] IJulia v1.23.2
  [429524aa] Optim v0.15.3
  [438e738f] PyCall v1.93.0
  [d330b81b] PyPlot v2.10.0
  [2913bbd2] StatsBase v0.33.14
  [88034a9c] StringDistances v0.11.2
  [10745b16] Statistics

I have read here Julia "Unsatisfiable requirements detected for package" error when installing multiple packages on how to read the status conflict error. It seems that Compat requires a newer DataFrame version than DataFrameMacros I am trying to install.

So Campat and DataFrameMacros seem to be incompatible.

However, I don't know where Compat came into play as I only try to install DataFrameMacros.

The packages I actually need for the code I am running are:

using PyPlot
using CSV
using DataFrames
using StatsBase
using PyCall
using Cairo
using Fontconfig
using Distributions
using DataFrameMacros, Chain
using Optim

Does anyone have a suggestion of how I can solve the error and install DataFrameMacros?

1 Answers1

0

The problem is ultimately due to Bio.jl - note that Bio.jl is deprecated, and the Github page archived. There's a blog post that unambiguously says:

It is not longer recommended that you use Bio.jl.

and gives the list of packages which have the functionality Bio.jl used to have. You can choose which of those to install based on what features of it you needed. Or if your list of "packages I actually need" is complete, it seems you don't need Bio.jl at all. In that case, you can just rm Bio and add DataFrameMacros instead.

This sort of issue is likely to arise again if you install everything in the default Julia environment @v1.7. I'd recommend that you instead do ] activate /your/project/folder (in the Julia REPL) to create a new environment there, and add the just packages you need for this project there. That will keep your projects from stepping on each other's toes and make conflicts like this less likely.

Sundar R
  • 13,776
  • 6
  • 49
  • 76