Difficulty installing polyhedra

I am getting a lot of conflicts when I try to install polyhedra. If anybody had any leads or suggestions I would be very grateful. Some of the (long) list of conflicts are:

(@v1.6) pkg> add Polyhedra
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Polyhedra [67491407]:
 Polyhedra [67491407] log:
 ├─possible versions are: 0.4.0-0.6.14 or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions 0.4.0-0.6.14
 ├─restricted by compatibility requirements with JuMP [4076af6c] to versions: 0.4.0-0.5.8 or uninstalled, leaving only versions: 0.4.0-0.5.8
 │ └─JuMP [4076af6c] log:
 │   ├─possible versions are: 0.18.3-0.21.7 or uninstalled
 │   ├─restricted to versions * by an explicit requirement, leaving only versions 0.18.3-0.21.7
 │   └─restricted by compatibility requirements with MathOptInterface [b8f27783] to versions: 0.18.3-0.20.1 or uninstalled, leaving only versions: 0.18.3-0.20.1
 │     └─MathOptInterface [b8f27783] log:
 │       ├─possible versions are: 0.5.0-0.9.21 or uninstalled
 │       ├─restricted to versions * by an explicit requirement, leaving only versions 0.5.0-0.9.21
 │       ├─restricted by compatibility requirements with Ipopt [b6b21f68] to versions: 0.6.0-0.9.21
   :

My julia version is:

julia> versioninfo()
Julia Version 1.6.0
Commit f9720dc2eb (2021-03-24 12:55 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, sandybridge)

I notice you are trying to install Polyhedra in your default environment - don’t do this, but rather create a project specific environment that only includes the packages you actually need for the specifc thing you’re doing. This is generally best practice as it minimizes versioning conflicts.

Now of course it might be possible that there are two packages you need at the same time which are actually incompatible, but this will be easier to diagnose if you’re in a fresh environment with only those packages in.

The relevant documentation is here: 4. Working with Environments · Pkg.jl

2 Likes

Thank you. That solved it – and also was the nudge I needed to start learning about project environments.

2 Likes