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

--force-reinstall not working correctly with multiple channels configured #584

Open
2 tasks done
danpetry opened this issue Dec 2, 2024 · 2 comments
Open
2 tasks done
Labels
type::bug describes erroneous operation, use severity::* to classify the type

Comments

@danpetry
Copy link

danpetry commented Dec 2, 2024

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

Moved from conda/conda#14372

What happened?

Please see comment here and below, but to recreate, with just "defaults" initially configured as channels in your config, and flexible channel priority:

conda install python-dateutil=2.9.0post0=*0
conda config --prepend channels conda-forge
conda install --force-reinstall python-dateutil

python-dateutil should change from one provided by defaults to one provided by conda-forge, since conda-forge has higher priority. This is what would happen if you were to simply uninstall then reinstall python-dateutil. In fact, nothing happens. This isn't the case with --solver=classic, where the package is correctly switched to the conda-forge version.

Additionally, if you don't add conda-forge as a higher-priority channel, python-dateutil will correctly be upgraded to the latest build number on defaults.

Conda Info


     active environment : test
    active env location : /Users/dpetry/miniconda3/envs/test
            shell level : 3
       user config file : /Users/dpetry/.condarc
 populated config files : /Users/dpetry/.condarc
          conda version : 24.5.0
    conda-build version : not installed
         python version : 3.9.18.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=m1
                          __conda=24.5.0=0
                          __osx=14.5=0
                          __unix=0=0
       base environment : /Users/dpetry/miniconda3  (writable)
      conda av data dir : /Users/dpetry/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-arm64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/osx-arm64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-arm64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/dpetry/Sandbox/distro-incubator/cbousseau/bin/pkgs_cache
       envs directories : /Users/dpetry/miniconda3/envs
                          /Users/dpetry/.conda/envs
               platform : osx-arm64
             user-agent : conda/24.5.0 requests/2.28.1 CPython/3.9.18 Darwin/23.5.0 OSX/14.5 solver/libmamba conda-libmamba-solver/23.11.1 libmambapy/1.5.3
                UID:GID : 502:20
             netrc file : None
           offline mode : False

Conda Config

add_anaconda_token: True
add_pip_as_python_dependency: True
aggressive_update_packages:
  - ca-certificates
  - certifi
  - openssl
allow_conda_downgrades: False
allow_cycles: True
allow_non_channel_urls: False
allow_softlinks: False
allowlist_channels: []
always_copy: False
always_softlink: False
always_yes: None
anaconda_upload: None
auto_activate_base: True
auto_stack: 0
auto_update_conda: True
bld_path: 
changeps1: True
channel_alias: https://conda.anaconda.org
channel_priority: flexible
channel_settings: []
channels:
  - conda-forge
  - defaults
client_ssl_cert: None
client_ssl_cert_key: None
clobber: False
conda_build:
  matrix_base_dir: ~/Sandbox/automated-build/c3i_configurations/anaconda_public
create_default_packages: []
croot: /Users/dpetry/miniconda3/conda-bld
custom_channels:
  pkgs/main: https://repo.anaconda.com
  pkgs/r: https://repo.anaconda.com
  Users/dpetry/miniconda3/conda-bld: file://
  pkgs/pro: https://repo.anaconda.com
custom_multichannels:
  defaults: 
    - https://repo.anaconda.com/pkgs/main
    - https://repo.anaconda.com/pkgs/r
  local: 
    - file:///Users/dpetry/miniconda3/conda-bld
debug: False
default_channels:
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
default_python: 3.9
default_threads: None
deps_modifier: not_set
dev: False
disallowed_packages: []
download_only: False
dry_run: False
enable_private_envs: False
env_prompt: ({default_env}) 
envs_dirs:
  - /Users/dpetry/miniconda3/envs
  - /Users/dpetry/.conda/envs
error_upload_url: https://conda.io/conda-post/unexpected-error
execute_threads: 1
experimental: []
extra_safety_checks: False
fetch_threads: 5
force: False
force_32bit: False
force_reinstall: False
force_remove: False
ignore_pinned: False
json: False
local_repodata_ttl: 1
migrated_channel_aliases: []
migrated_custom_channels: {}
no_lock: False
no_plugins: False
non_admin_enabled: True
notify_outdated_conda: True
number_channel_notices: 5
offline: False
override_channels_enabled: True
path_conflict: clobber
pinned_packages: []
pip_interop_enabled: False
pkgs_dirs:
  - /Users/dpetry/Sandbox/distro-incubator/cbousseau/bin/pkgs_cache
proxy_servers: {}
quiet: False
register_envs: True
remote_backoff_factor: 1
remote_connect_timeout_secs: 9.15
remote_max_retries: 3
remote_read_timeout_secs: 60.0
repodata_fns:
  - current_repodata.json
  - repodata.json
repodata_threads: None
repodata_use_zst: True
report_errors: True
reporters:
  - {'backend': 'console', 'output': 'stdout', 'verbosity': 0, 'quiet': False}
restore_free_channel: False
rollback_enabled: True
root_prefix: /Users/dpetry/miniconda3
safety_checks: warn
sat_solver: pycosat
separate_format_cache: False
shortcuts: True
shortcuts_only: []
show_channel_urls: None
signing_metadata_url_base: None
solver: libmamba
solver_ignore_timestamps: False
ssl_verify: True
subdir: osx-arm64
subdirs:
  - osx-arm64
  - noarch
target_prefix_override: 
trace: False
track_features: []
unsatisfiable_hints: True
unsatisfiable_hints_check_depth: 2
update_modifier: update_specs
use_index_cache: False
use_local: False
use_only_tar_bz2: False
verbosity: 0
verify_threads: 1

Conda list

# packages in environment at /Users/dpetry/miniconda3/envs/test:
#
# Name                    Version                   Build  Channel
bzip2                     1.0.8                h80987f9_6  
ca-certificates           2024.9.24            hca03da5_0  
expat                     2.6.3                h313beb8_0  
libcxx                    14.0.6               h848a8c0_0  
libffi                    3.4.4                hca03da5_1  
ncurses                   6.4                  h313beb8_0  
openssl                   3.0.15               h80987f9_0  
pip                       24.2            py312hca03da5_0  
python                    3.12.7               h99e199e_0  
python-dateutil           2.9.0post0      py312hca03da5_0  
readline                  8.2                  h1a28f6b_0  
setuptools                75.1.0          py312hca03da5_0  
six                       1.16.0             pyhd3eb1b0_1  
sqlite                    3.45.3               h80987f9_0  
tk                        8.6.14               h6ba3021_0  
tzdata                    2024b                h04d1e81_0  
wheel                     0.44.0          py312hca03da5_0  
xz                        5.4.6                h80987f9_1  
zlib                      1.2.13               h18a0788_1 

Additional Context

No response

Conda Info

Conda Config

Conda list

Additional Context

No response

@danpetry danpetry added the type::bug describes erroneous operation, use severity::* to classify the type label Dec 2, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in 🧭 Planning Dec 2, 2024
@jaimergp
Copy link
Contributor

jaimergp commented Dec 3, 2024

Can you report the behavior for latest version? You are using v23.11.

@danpetry
Copy link
Author

danpetry commented Dec 3, 2024

Same behaviour:

(test) dpetry@Daniels-MacBook-Pro ~ $ conda list
# packages in environment at /Users/dpetry/miniconda3/envs/test:
#
# Name                    Version                   Build  Channel
bzip2                     1.0.8                h80987f9_6  
ca-certificates           2024.9.24            hca03da5_0  
expat                     2.6.3                h313beb8_0  
libcxx                    14.0.6               h848a8c0_0  
libffi                    3.4.4                hca03da5_1  
ncurses                   6.4                  h313beb8_0  
openssl                   3.0.15               h80987f9_0  
pip                       24.2            py312hca03da5_0  
python                    3.12.7               h99e199e_0  
python-dateutil           2.9.0post0      py312hca03da5_0  
readline                  8.2                  h1a28f6b_0  
setuptools                75.1.0          py312hca03da5_0  
six                       1.16.0             pyhd3eb1b0_1  
sqlite                    3.45.3               h80987f9_0  
tk                        8.6.14               h6ba3021_0  
tzdata                    2024b                h04d1e81_0  
wheel                     0.44.0          py312hca03da5_0  
xz                        5.4.6                h80987f9_1  
zlib                      1.2.13               h18a0788_1
(test) dpetry@Daniels-MacBook-Pro ~ $ conda info

     active environment : test
    active env location : /Users/dpetry/miniconda3/envs/test
            shell level : 3
       user config file : /Users/dpetry/.condarc
 populated config files : /Users/dpetry/.condarc
          conda version : 24.11.0
    conda-build version : not installed
         python version : 3.9.18.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=m1
                          __conda=24.11.0=0
                          __osx=14.5=0
                          __unix=0=0
       base environment : /Users/dpetry/miniconda3  (writable)
      conda av data dir : /Users/dpetry/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-arm64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-arm64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/dpetry/Sandbox/distro-incubator/cbousseau/bin/pkgs_cache
       envs directories : /Users/dpetry/miniconda3/envs
                          /Users/dpetry/.conda/envs
               platform : osx-arm64
             user-agent : conda/24.11.0 requests/2.28.1 CPython/3.9.18 Darwin/23.5.0 OSX/14.5 solver/libmamba conda-libmamba-solver/24.9.0 libmambapy/1.5.8
                UID:GID : 502:20
             netrc file : None
           offline mode : False

(test) dpetry@Daniels-MacBook-Pro ~ $ conda config --show channels
channels:
  - defaults
(test) dpetry@Daniels-MacBook-Pro ~ $ conda config --prepend channels conda-forge
(test) dpetry@Daniels-MacBook-Pro ~ $ conda install --force-reinstall python-dateutil
Channels:
 - conda-forge
 - defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /Users/dpetry/miniconda3/envs/test

  added / updated specs:
    - python-dateutil


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    openssl-3.4.0              |       h39f12f2_0         2.8 MB  conda-forge
    ------------------------------------------------------------
                                           Total:         2.8 MB

The following packages will be UPDATED:

  openssl              pkgs/main::openssl-3.0.15-h80987f9_0 --> conda-forge::openssl-3.4.0-h39f12f2_0 


Proceed ([y]/n)? 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::bug describes erroneous operation, use severity::* to classify the type
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants