Install the package from the specific channel with conda
Asked Answered
S

2

10

I need the version 5.12 of the qt package in anaconda, but version 5.9.7 is installed.

>>> conda list qt -f
# packages in environment at /PATH/anaconda3/env/my_env
#
# Name                    Version                   Build  Channel
qt                        5.9.7                h5867ecd_1

Since the latest version of qt in the default channel anaconda is 5.9.7(https://anaconda.org/anaconda/qt), I want to install qt package from the channel conda-forge, which has the version 5.12.5(https://anaconda.org/conda-forge/qt).

So I tried to install qt from conda-forge channel with this command.

>>> conda install qt -c conda-forge --override-channels

But conda didn't install qt from the new channel and printed that all packages are already installed.

Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.

FYI, my channel configuration in .condarc is

channels:
  - defaults
  - conda-forge
channel_priority: disabled

Why does not conda update qt and how to install qt from the channel conda-forge?

Schifra answered 1/6, 2020 at 7:47 Comment(1)
You can prefix packages with a channel: conda install conda-forge::qt - you can also force installing a specific version by conda install "qt>=5.12"Heritable
H
2
  1. Your .condarc file is mis-specified if you want conda-forge to take priority. You want this:

    channels:
      - conda-forge
      - defaults
    channel_priority: flexible  # or 'strict'
    
  2. If you want a specific version, try specifying the version in your command. You can even both version and specific build id:

    # This effectively means qt 5.12.*
    conda install -c conda-forge qt=5.12
    
    # You can also specify the exact version and build ID, if you happen to know them:
    conda install -c conda-forge qt=5.12.5=hd8c4c69_1
    
Hildredhildreth answered 1/6, 2020 at 17:42 Comment(0)
S
1

I think there is a dependency problem on qt from conda-forge.

I could get qt from conda-forge by upgrading all packages from conda-forge.

conda upgrade -c conda-forge --all
Schifra answered 4/6, 2020 at 2:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.