python-2.7condachoco

conda create environment command gives 'Found conflicts! Looking for incompatible packages.'


I installed miniconda via choco install miniconda3.

Creating a python3 environment works fine.

conda create --name envA python=3 --verbose

But creating a python2 environment has a problem.

conda create --name envB python=2 --verbose
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working...
Found conflicts! Looking for incompatible packages.
failed
Traceback (most recent call last):
...

File "C:\Users\fred\miniconda3\lib\site-packages\conda\resolve.py", line 352, in find_conflicts
    raise UnsatisfiableError(bad_deps, strict=strict_channel_priority)
conda.exceptions.UnsatisfiableError

Solution

  • @cel gets credit for this

    Switching to mamba provided better diagnostics.

    mamba create -n foo python=2
    
    Looking for: ['python=2']
    
    conda-forge/win-64                                          Using cache
    conda-forge/noarch                                          Using cache
    Encountered problems while solving:
     - nothing provides vc 9.* needed by python-2.7.12-0
    

    Then use mamba to find vc.

    mamba search vc
    
    # Name                       Version           Build  Channel
    vc                              14.1      h21ff451_1  conda-forge
    vc                              14.1      h6d1b3ff_2  conda-forge
    ...
    

    The vc v9 can be found in the defaults channel.

    mamba search 'vc[channel=defaults]'
    
    # Name                       Version           Build  Channel
    vc                                 9      h2eaa2aa_6  pkgs/main
    ...
    

    Updating the .condarc with the defaults channel, corrected the problem.

    channels:
      - conda-forge
      - defaults
    channel_priority: disabled
    

    As a final note, should someone else find themselves in this situation...

    The ~/.condarc got changed (dropping the defaults channel) as part of installing mambaforge.