How to set up a third-party mirror for Conda

Published on Aug. 22, 2023, 12:16 p.m.

To set up a third-party mirror for Conda, you can use the following steps:

  1. Create a .condarc file in your home directory if it doesn’t already exist.
  2. Add the following lines to the .condarc file:
channels:
  - defaults
  - https://<mirror_url>/conda-forge/
  - https://<mirror_url>/msys2/
  - https://<mirror_url>/pytorch/

Replace <mirror_url> with the URL of the mirror you want to use.

  1. Save the .condarc file.

After setting up the mirror, Conda will prioritize packages from the mirror you added. You can test if the mirror is working by running conda update conda.

Note that some mirrors require authentication or have specific configurations. Please refer to the documentation of the mirror you choose for more information.

Tags: