Conda per-environment channels & cross-arch install

“conda” is a package manager commonly used for Python distributions that can manage both Python and non-Python packages. Conda channels are repositories of packages that conda can install from. Conda channels can provide CPU architecture-specific optimized packages. For systems with CPU emulations like Windows Prism, channels for distinct CPU architectures like “win-64” on a “win-arm64” system can allow using packages build for non-native architectures when native versions are unavailable. Conda prioritized channels can help resolve version conflicts, helping mitigate Python package dependency hell

Conda channel priority order is ordered by which channel appears first (highest) in .condarc. It’s generally recommended to add per-environment channels rather than modifying the global configuration to avoid corrupting multiple environments with incompatible packages. In general “strict” channel priority is recommended to mitigate compatibility problems.

conda config --set channel_priority strict

# check with
conda config --get channel_priority

Add a conda per-environment channel:

conda activate <env-name>

conda config --env --add channels <channel-name>

Get the current channel list for an environment:

conda activate <env-name>

conda config --env --show channels

Example of conda cross-architecture install

Windows ARM64 channels may not have older Python versions that are available on x86-64 channels. One might be able to install an older EOL (End of Life) Python version from the “win-64” channel on a “win-arm64” system.

conda search --subdir win-64 python

may show more and additional older Python versions than

conda search --subdir win-arm64 python

Suppose Python 3.9 is available on “win-64” but not on “win-arm64”. Use the “win-64” channel to install Python 3.9 on a “win-arm64” system:

conda create -n py39 --subdir win-64 python=3.9

This will be visible in the environment’s channel list:

conda env list

and as usual used by:

conda activate py39