-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Checklist
- I added a descriptive title
- I searched open requests and couldn't find a duplicate
What is the idea?
Support user specification of a target platform when trying to update packages in an environment.
Why is this needed?
Since at least version 24.3.0, users have been able to create environments with packages compiled for different platforms (architectures). Specifically, conda env create
and conda create
commands have supported --platform/--subdir
options. This is particularly useful for Apple Silicon (ARM-based) Mac users (osx-arm64
platform) trying to install packages only available for the osx-64
platform, which can still be run on ARM-based Macs through Rosetta.
However, no similar target platform options currently exist for updating packages, whether via conda env update
or conda update
.
What should happen?
conda env update
and conda update
should support --platform
and/or --subdir
options.
Additional Context
There are currently at least 2 workarounds for updating packages targeting a different platform. Here, I assume that the environment.yaml file has been updated since the environment was initially created.
-
Remove and re-create the environment.
conda env remove -y -n myenv # example targeting the osx-64 platform conda env create --platform osx-64 -f environment.yaml
-
Set the
subdir
conda config variable.- This was the main way to create environments targeting different platforms in older versions of conda, which was superseded by the
--platform
or--subdir
options toconda env create
andconda create
. Unfortunately, this remains necessary for updating packages (if you don't want to remove and re-create the environment).
# example targeting the osx-64 platform config --env --set subdir osx-64 conda env update -f environment.yaml
- This was the main way to create environments targeting different platforms in older versions of conda, which was superseded by the
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status