Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to install on MacOS #16

Closed
harryprince opened this issue Aug 11, 2022 · 1 comment
Closed

Fail to install on MacOS #16

harryprince opened this issue Aug 11, 2022 · 1 comment

Comments

@harryprince
Copy link

julia> import Pkg; Pkg.add("COPT")
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package MathOptInterface [b8f27783]:
 MathOptInterface [b8f27783] log:
 ├─possible versions are: 0.5.0-1.6.1 or uninstalled
 ├─restricted by compatibility requirements with COPT [227a2e2d] to versions: 1.0.0-1.6.1
 │ └─COPT [227a2e2d] log:
 │   ├─possible versions are: 1.0.0-1.0.4 or uninstalled
 │   └─restricted to versions * by an explicit requirement, leaving only versions 1.0.0-1.0.4
 └─restricted by compatibility requirements with GAMS [1ca51c6a] to versions: [0.9.13-0.9.22, 0.10.7-0.10.9] — no versions left
   └─GAMS [1ca51c6a] log:
     ├─possible versions are: 0.1.0-0.3.4 or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions 0.1.0-0.3.4
Stacktrace:
  [1] propagate_constraints!(graph::Pkg.Resolve.Graph, sources::Set{Int64}; log_events::Bool)
    @ Pkg.Resolve /usr/local/Cellar/julia/1.7.0_1/share/julia/stdlib/v1.7/Pkg/src/Resolve/graphtype.jl:1063
  [2] propagate_constraints! (repeats 2 times)
    @ /usr/local/Cellar/julia/1.7.0_1/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 /usr/local/Cellar/julia/1.7.0_1/share/julia/stdlib/v1.7/Pkg/src/Resolve/graphtype.jl:1519
  [4] simplify_graph! (repeats 2 times)
    @ /usr/local/Cellar/julia/1.7.0_1/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 /usr/local/Cellar/julia/1.7.0_1/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 /usr/local/Cellar/julia/1.7.0_1/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 /usr/local/Cellar/julia/1.7.0_1/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 /usr/local/Cellar/julia/1.7.0_1/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 /usr/local/Cellar/julia/1.7.0_1/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 /usr/local/Cellar/julia/1.7.0_1/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 /usr/local/Cellar/julia/1.7.0_1/share/julia/stdlib/v1.7/Pkg/src/API.jl:149
 [12] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API /usr/local/Cellar/julia/1.7.0_1/share/julia/stdlib/v1.7/Pkg/src/API.jl:144
 [13] #add#27
    @ /usr/local/Cellar/julia/1.7.0_1/share/julia/stdlib/v1.7/Pkg/src/API.jl:142 [inlined]
 [14] add
    @ /usr/local/Cellar/julia/1.7.0_1/share/julia/stdlib/v1.7/Pkg/src/API.jl:142 [inlined]
 [15] #add#26
    @ /usr/local/Cellar/julia/1.7.0_1/share/julia/stdlib/v1.7/Pkg/src/API.jl:141 [inlined]
 [16] add(pkg::String)
    @ Pkg.API /usr/local/Cellar/julia/1.7.0_1/share/julia/stdlib/v1.7/Pkg/src/API.jl:141
 [17] top-level scope
    @ REPL[14]:1

@lschork2
Copy link
Collaborator

The installation fails because you have already GAMS installed and GAMS and COPT depend on incompatible versions of MathOptInterface. When you do not need to use GAMS and COPT at the same time, you can install COPT in a different Julia environment:

julia> mkdir("Project1")
julia> cd("Project1")
julia> # press `]` to activate the package REPL mode...
(v1.7) pkg> activate .
(Project1) pkg> add COPT

@lschork2 lschork2 closed this as completed Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants