Pyomo.extra installation fails

Question:

I have installed Anaconda from scratch and then installed pyomo, which worked.

When I try to install pyomo.extra, it runs about 1/2 hour and then fails.
I had tried:

  • conda install -c conda-forge pyomo.extras
  • conda install -c "conda-forge/label/cf201901" pyomo.extras
  • conda install -c "conda-forge/label/cf202003" pyomo.extras
    as recommended on https://anaconda.org/conda-forge/pyomo.extras

and also

conda config –add channels conda-forge
conda install pyomo.extras

subsequently checking with

conda search pyomo.extras –channel conda-forge

as recommended on https://github.com/conda-forge/pyomo.extras-feedstock
indicated that pyomo.extra isn’t installed.

here is the generated output.

(base) PS C:WINDOWSsystem32> conda install pyomo.extras
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
Examining conflict for pyomo.extras:  75%|███████████████████████████████████▎           | 3/4 [00:03<00:01,  1.15s/it]failed

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - pyomo.extras -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|3.4.*']

Your python: python=3.9

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

The following specifications were found to be incompatible with your system:

  - feature:/win-64::__win==0=0
  - feature:|@/win-64::__win==0=0
  - pyomo.extras -> ipython -> __osx
  - pyomo.extras -> ipython -> __win

Your installed version is: 0


(base) PS C:WINDOWSsystem32> conda search pyomo.extras --channel conda-forge
Loading channels: -
(base) PS C:WINDOWSsystem32>

Questions:

  • what might be the reason why installation of pyomo.extra fails?
  • what alternatives for installing pyomo.extra can be recommende?
Asked By: user2961818

||

Answers:

The package is only available for Python 2.7, 3.6, and 3.7, but your target environment currently has Python 3.9. Conda will not change the Python version in-place because it entails changing pretty much every package in the environment. Instead, try creating a new environment with a compatible Python version.

## include any other packages now
conda create --name foo python=3.7 pyomo pyomo.extras

Why only old versions? The feedstock repository has been failing to build updated versions since Python 3.8 and no maintainers have stepped in to fix it. If you would like to see updated versions built, then drop an Issue on the feedstock or, if you feel comfortable trying to fix it, send a Pull Request. The squeaky wheel get’s the grease!

Answered By: merv
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.