Install Conda
This guide covers installing Miniconda and Anaconda on Linux (Debian / Ubuntu) and macOS. Windows users can use the official graphical .exe installer with similar steps.
See the Miniconda docs and Anaconda docs.
Choose a version
- Miniconda: lightweight, only Conda + Python — recommended for most cases.
- Anaconda: full suite, out-of-the-box — good for beginners or teaching.
- Miniforge (recommended for ARM / China networks): maintained by conda-forge, bundles Conda + Mamba, better ARM support and uses conda-forge by default.
💡 Architecture note: official installers come in
x86_64(Intel/AMD) andarm64(Apple Silicon). For Linux ARM64 devices use the-aarch64script (see below), NOTMacOSX-arm64.
Download the installer (Linux / macOS)
⚠️ ARM platforms: recent official Miniconda installers ship a
constructorbinary that requires ARMv8.1+ instructions. On ARMv8.0 devices (e.g. Raspberry Pi 3/4 early revs, some Rockchip/Radxa boards with Cortex-A53/A72) it crashes withIllegal instruction. On such hardware use the Miniforgeaarch64installer instead (verified working on ARMv8.0).
- Miniconda (x86_64 / Apple Silicon)
- Miniforge (recommended for ARM / China)
- Anaconda
# x86_64 (Intel / AMD)curl -fsSL -o miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh# Apple Silicon (macOS arm64)curl -fsSL -o miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh# Linux ARM64 (aarch64) — note: not MacOSX-arm64curl -fsSL -o miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh# x86_64curl -fsSL -o miniforge.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh# Linux ARM64 (aarch64)curl -fsSL -o miniforge.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh# macOS (Intel / Apple Silicon universal)curl -fsSL -o miniforge.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-$(uname -m).shIf GitHub is slow, use the TUNA mirror:
# Linux ARM64 (aarch64), TUNA mirrorcurl -fsSL -o miniforge.sh https://mirrors.tuna.tsinghua.edu.cn/github-release/conda-forge/miniforge/LatestRelease/Miniforge3-Linux-aarch64.sh# x86_64curl -fsSL -o anaconda.sh https://repo.anaconda.com/archive/Anaconda3-latest-Linux-x86_64.shRun the installer
For Miniconda (replace miniconda.sh with anaconda.sh for Anaconda, or miniforge.sh for Miniforge):
bash miniconda.sh# or Miniforgebash miniforge.sh💡 To install non-interactively to the default
~/miniconda3, add-b:bash miniforge.sh -b.
During install you will be prompted to:
- Press enter to read the license, then type
yesto accept. - Confirm the install path (default
~/miniconda3). - Initialize Conda (
Do you wish the installer to initialize Miniconda3...) — typeyesso it injects into your shell.
Reload your shell:
source ~/.bashrc # Bash# orsource ~/.zshrc # ZshVerify
conda --version# e.g. conda 24.11.3Update Conda itself:
conda update -n base -c defaults condaConfigure a mirror (China / restricted networks)
The default Anaconda source (repo.anaconda.com / conda.anaconda.org) can be slow, time out, or be unreachable in some networks. Configure a local mirror.
⚠️ Mirror URLs may change — follow each mirror site's latest guide. Common mirrors that work:
- Beijing Foreign Studies Univ. (BFSU):
https://mirrors.bfsu.edu.cn/anaconda/(the HTTP plaintexthttp://...is often more reliable than HTTPS on restricted networks)- Tsinghua TUNA:
https://mirrors.tuna.tsinghua.edu.cn/anaconda/- USTC:
https://mirrors.ustc.edu.cn/anaconda/
Configure Conda channels
- BFSU (recommended for restricted nets)
- Tsinghua TUNA
# Use HTTP plaintext to avoid HTTPS issues on some networksconda config --remove-key channels 2>/dev/nullconda config --add channels http://mirrors.bfsu.edu.cn/anaconda/pkgs/mainconda config --set channel_alias http://mirrors.bfsu.edu.cn/anacondaconda config --set show_channel_urls yesconda config --set ssl_verify falseconda config --remove-key channels 2>/dev/nullconda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/mainconda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forgeconda config --set show_channel_urls yes⚠️ Clean up Miniforge's default channels: Miniforge writes a default
conda-forgechannel (pointing to official HTTPSconda.anaconda.org/prefix.dev) into$HOME/miniconda3/.condarc(or$HOME/.condarc). On restricted networks this slows down or blocks installs. Edit that file sochannelsonly lists your chosen mirror, and delete themirrored_channelsblock.
Raise download retries (large files fail easily)
On some networks, larger packages (> a few MB) intermittently fail with CondaHTTPError: HTTP 000 CONNECTION FAILED. Raising retries makes installs stable:
conda config --set remote_max_retries 10conda config --set remote_read_timeout_secs 60conda config --set remote_connect_timeout_secs 30Verify:
conda config --show channelsConfigure a pip mirror
Inside a Conda env, pip from the official PyPI may also be unreachable. Configure a pip mirror too (BFSU example):
pip config set global.index-url https://mirrors.bfsu.edu.cn/pypi/web/simpleUninstall Conda
To fully remove (default path):
rm -rf ~/miniconda3# also delete the conda init block in ~/.bashrc / ~/.zshrc (between # >>> conda initialize >>> and # <<< conda initialize <<<)⚠️ Back up important envs first (Export / Import);
rm -rfis irreversible.