Skip to main content
Windows 10/11 Miniconda Anaconda Conda is a cross-platform package and environment management system that plays two roles simultaneously: it installs packages (like pip) and manages isolated Python environments (like venv). More importantly, it is not limited to Python packages — C/C++ libraries, CUDA runtimes, and even R language packages all fall within its scope. This guide covers installation, configuration, customization, and troubleshooting.
Conda vs pip
  • pip primarily manages Python packages from PyPI and installs only what the package author has bundled. For C extensions, it uses a pre-built binary wheel if one is available; otherwise it compiles from source, relying on system-installed build tools and external C/C++ libraries.
  • conda is an “environment + package manager.” Its packages can bundle Python itself, C/C++ libraries, CUDA runtimes, and even compilers, and it uses a dependency-resolution mechanism to ensure the entire binary stack is mutually compatible. This makes it significantly more stable for scientific computing and ML/DL workloads — installing packages like numpy, scipy, and pytorch that depend heavily on BLAS/LAPACK/CUDA no longer requires managing low-level dependencies by hand.

Anaconda vs Miniconda

The official website offers two options: Anaconda and Miniconda. Both include conda as their core tool; the difference is how much comes pre-bundled.

Anaconda

Full bundle — ships with 300+ pre-installed packages (NumPy, Pandas, Jupyter, Scikit-learn, …), ready to use out of the box.
  • Installation size: approximately 4.4 GB
  • Includes Anaconda Navigator (GUI management interface)
  • Best for: beginners and those who prefer not to worry about package installation

Miniconda

Personally recommended.
Minimal installation — only conda + Python + essential dependencies, giving you a clean starting point.
  • Installation size: approximately 80 MB
  • CLI-only operation
  • Best for: experienced developers, CI/CD pipelines, container environments, disk-space-constrained setups, and avoiding Anaconda licensing concerns
ComparisonAnacondaMiniconda
Installation size~1.1 GB~90 MB
Pre-installed packages300+ data science packagesconda + Python only
GUI managementAnaconda NavigatorNone
Use caseQuick start, teaching environmentsPrecise control, production environments
Customization flexibilityLower (many pre-installed packages you may not need)Maximum (install only what you need)
Which should I choose?Plenty of disk space and want to get started quickly → Anaconda.Want precise environment control, or need to conserve SSD space → Miniconda. RecommendedIn practice, most professional developers prefer Miniconda, because of the 300+ packages Anaconda pre-installs, typically only a few dozen are ever used.

Installation

Download Miniconda

Go to the Miniconda official download page and select the Windows 64-bit Miniconda .exe installer.
  1. Run the installer Double-click the downloaded Miniconda3-latest-Windows-x86_64.exe and click Next.
  2. Accept the license agreement Read and accept the License Agreement.
  3. Choose the installation type
    • Just Me (recommended): Installs for the current user only; no administrator privileges required.
    • All Users: System-wide installation; requires administrator privileges.
    Unless you have a clear multi-user requirement, Just Me is the right choice.
  4. Choose the installation path The default path is C:\Users\<your-username>\miniconda3. To install to a different location (such as the D drive), change the path at this step. See the Installing to the D Drive section below for details.
    The path must not contain spaces or non-ASCII charactersConda’s installation path cannot contain spaces or non-ASCII characters. Paths like D:\Program Files\conda or D:\MyApps\conda will cause problems. Use a clean path such as D:\miniconda3.
  5. Advanced options The installer will ask about two options:
    OptionRecommendationDescription
    Create start menu shortcutsCheckCreates an Anaconda Prompt shortcut in the Start Menu
    Add Miniconda3 to my PATHLeave uncheckedNot recommended officially: conda’s binary directory contains other package binaries; permanently adding it to PATH can conflict with other software. Use Anaconda Prompt or conda init instead
    Register Miniconda3 as default PythonSituationalCheck if there is no other Python on the system (checked by default)
    Clear the package cache upon completionCheckRuns conda clean --all --force-pkgs-dirs after installation to save space
  6. Complete the installation Click Install, wait for the installation to finish, then click Finish.
Parameter notesWindows:
  • /S: Silent mode (no GUI)
  • /D=: Specifies the installation path — must be the last argument, and the path must not be wrapped in quotes
  • Without /D=, the default installation path is C:\Users\<username>\miniconda3
macOS / Linux:
  • -b: Batch mode (silent install, no interactive confirmation)
  • -u: Update mode — overwrites if the path already exists
  • -p: Specifies the installation path

Post-installation Verification

After installation, open PowerShell or Anaconda Prompt (search from the Start Menu) and run the following verification commands:
If conda is not recognized, see Troubleshooting.
# Check the conda version
conda --version

# Show full environment information
conda info
Expected output example:
conda 24.x.x

     active environment : base
    active env location : D:\miniconda3
       user config file : C:\Users\yourname\.condarc
 populated config files : D:\miniconda3\.condarc
          conda version : 24.x.x
               platform : win-64
               ...
There are two easily confused configuration file fields in the output. .condarc (conda run configuration) is conda’s configuration file, written in YAML syntax. It controls channels, default paths, behavioral preferences, and all other conda settings. Conda allows multiple .condarc files to coexist at different locations:
FieldDescription
user config fileThe user-level .condarc, always located at C:\Users\<username>\.condarc. This path is shown even if the file does not yet exist
populated config files.condarc files that actually contain content. When installed on the D drive, this is typically D:\miniconda3\.condarc
Which .condarc takes effect?Conda reads all .condarc files it finds simultaneously and merges their settings. If two files have conflicting settings, the user-level file (C:\Users\...) takes priority.It is generally best to maintain only one .condarc to avoid scattered configuration. You can edit the one under the installation directory (D:\miniconda3\.condarc) directly, or use conda config commands (which write to the user-level file by default):
# View all active settings (merged result)
conda config --show

# Set a configuration value (writes to user-level .condarc)
conda config --set auto_activate_base false

# Show the source of each configuration setting
conda config --show-sources

Create a test environment

Verify that conda can correctly create an isolated environment and install packages:
# Create a Python 3.12 test environment
conda create -n test_env python=3.12 -y

# Activate the environment
conda activate test_env

# Confirm the Python version
python --version

# Install a package to verify
conda install numpy -y

# Quick test
python -c "import numpy; print(f'NumPy {numpy.__version__} OK')"

# Clean up after testing
conda deactivate
conda remove -n test_env --all -y
You should see the (test_env) prefixAfter successfully running conda activate test_env, the command prompt prefix changes from (base) to (test_env), indicating that you are working inside that isolated environment.

Custom Configuration

Installing to the D Drive

Why install to the D drive?

Many Windows users have a disk layout like this:
DrivePurposeCharacteristics
C drive (SSD)Operating system + core applicationsSmaller capacity (128–512 GB), fast
D drive (HDD/SSD)Data and development toolsLarger capacity (1 TB+)
Conda environments and package caches grow continuously. A single ML project environment can easily reach 2–5 GB (especially with PyTorch or TensorFlow), and multiple projects will quickly consume C drive space. Installing Conda to the D drive lets you:
  • Avoid system instability caused by a full C drive
  • Preserve development environments when reinstalling the OS
  • Keep environments separate from the system for cleaner maintenance
Performance trade-offIf your D drive is a traditional HDD (hard disk drive), conda package extraction and environment creation will be noticeably slower than on an SSD.If the D drive is also an SSD, this concern does not apply.

How to do it

The directory structure after installing to the D drive looks like this:
  • D:\
    • miniconda3/ Conda base installation directory
      • condabin/
      • Scripts/
        • conda.exe
        • activate.bat
      • python.exe
      • Lib/
      • Library/
      • envs/ Default environment storage location
        • ml_project/
          • python.exe
          • Lib/
        • web_dev/
      • pkgs/ Package cache
      • .condarc
Finding your environmentsAll environments created with conda create -n myenv are stored by default under miniconda3/envs/. You can reference an environment’s Python interpreter directly, for example D:\miniconda3\envs\ml_project\python.exe.

Advanced: custom environment and cache paths

If you want to store environments and caches outside the Miniconda3 directory — for example, to share environments across multiple Conda installations or for finer-grained disk management — you can configure this in the .condarc configuration file:
.condarc
# Custom environment storage path
envs_dirs:
  - D:\conda_envs

# Custom package cache path
pkgs_dirs:
  - D:\conda_pkgs
.condarc locationThe .condarc file lives in the user home directory: C:\Users\<your-username>\.condarc. If it does not exist, you can create it manually, or run conda config --set envs_dirs D:\conda_envs to have conda create it automatically.

The Channel Mechanism

What is a channel?

A channel is a source repository for conda packages — essentially a remote directory (URL) containing pre-compiled packages. When you run conda install numpy, conda searches channels in priority order and downloads the first matching package version it finds. Think of it like an app store for your phone:
ConceptAnalogy
ChannelApp Store (package source)
conda installDownloading an app from the store
Channel priorityWhich store to search first

Major channels

ChannelMaintainerHighlightsLicense
defaultsAnaconda, Inc.Stable, the default channelMay require a paid license for commercial use
conda-forgeCommunity-maintainedLargest package selection, fastest updatesCompletely free
pytorchPyTorch teamOfficial latest PyTorch releasesFree
nvidiaNVIDIACUDA toolkit, cuDNNFree
Anaconda Terms of ServiceSince 2024, Anaconda has updated the Terms of Service for the defaults channel and Anaconda Distribution:
  • Individual use and organizations with fewer than 200 employees: Free to use;
  • Organizations with 200 or more employees or contractors: A paid license is required to access the defaults channel or Anaconda Distribution.
  • Educational institutions: Pure classroom use is generally free, but large universities or research institutions conducting research may be considered “organizational use” and may not be fully exempt.
If you are in a large enterprise or institution and only need the conda ecosystem without depending on the Anaconda defaults channel, the recommended approach is Miniconda/Mambaforge with conda-forge as the primary channel — fully open source, free, and not subject to Anaconda’s licensing terms. conda-forge is community-maintained, completely free for commercial use, and unaffected by Anaconda’s fee structure.

Configuring channels

# View current channel configuration
conda config --show channels

# Add conda-forge as the highest priority
conda config --add channels conda-forge

# Enable strict priority mode (recommended)
conda config --set channel_priority strict

# Specify a channel for a single install (one-time)
conda install -c pytorch pytorch torchvision
What is strict priority mode?
Channel list:
  1. conda-forge    ← Highest priority, searched first
  2. defaults       ← Searched only if conda-forge doesn't have it

In strict mode: if conda-forge has numpy 1.26 and defaults has numpy 1.27,
conda still installs conda-forge's 1.26, because it comes from the higher-priority channel.
Recommended .condarc channel configuration
channels:
- conda-forge
- defaults
channel_priority: strict
With this configuration, conda-forge is the primary source (free and fast-updating), with defaults as a fallback. See the full example in the .condarc configuration file section.

.condarc Configuration File

.condarc is conda’s global configuration file, written in YAML syntax. The following is a complete example of commonly used settings:
.condarc
# ── Channel settings ──
channels:
  - conda-forge
  - defaults
channel_priority: strict

# ── Path settings ──
envs_dirs:
  - D:\conda_envs
pkgs_dirs:
  - D:\conda_pkgs

# ── Behavior settings ──
auto_activate_base: false      # Whether to auto-activate the base environment (recommended: false)
auto_update_conda: true        # Whether to auto-update conda
show_channel_urls: true        # Show the source channel when installing packages
auto_activate_base: falseBy default, opening a new terminal activates the (base) environment. Setting this to false requires a manual conda activate base to enter it. This prevents accidental pollution of the base environment and is a good practice.

Quick Reference

Environment management

# Create an environment (specify Python version)
conda create -n myenv python=3.12

# Create an environment at a specific path (use --prefix instead of -n)
{/* conda create python=3.9 --prefix D:\Miniconda3\envs\python39 -y */}

# Create an environment from a YAML file
conda env create -f environment.yml

# Activate / deactivate an environment
conda activate myenv
conda deactivate

# List all environments
conda env list

# Remove an environment
conda remove -n myenv --all

# Export the environment (reproducible snapshot)
conda env export > environment.yml

# Export only manually installed packages (more cross-platform compatible)
conda env export --from-history > environment.yml

Package management

# Install packages
conda install numpy pandas matplotlib

# Install a specific version
conda install python=3.11 numpy=1.26

# Install from a specific channel
conda install -c conda-forge scikit-learn

# Update a package
conda update numpy

# Update all packages
conda update --all

# Search for a package
conda search pytorch

# Remove a package
conda remove numpy

# List installed packages
conda list
Notes on mixing conda and pipYou can use pip to install packages not available in conda channels, but keep these points in mind:
  1. conda first, pip second: Install what you can with conda first, then fill in the gaps with pip.
  2. Avoid repeatedly alternating: conda does not track pip-installed packages; alternating between the two repeatedly tends to cause dependency conflicts.
  3. Watch the export: conda env export records both conda-installed and pip-installed packages.

Troubleshooting

Q: conda command not found?

A: If you did not check “Add to PATH” during installation, a regular CMD or PowerShell session will not recognize the conda command. There are two solutions: Method 1: Use conda init (recommended) Run this once from Anaconda Prompt — after that, all PowerShell sessions will recognize conda:
D:\miniconda3\Scripts\conda.exe init powershell
Changes take effect after reopening PowerShell. Method 2: Manually add conda to the PATH environment variable If conda init does not work correctly, add conda’s paths to the system PATH manually:
  1. Type “environment variables” in the Windows search bar and open “Edit the system environment variables”
  2. Click the “Environment Variables” button
  3. Find Path under “User variables” or “System variables” and click “Edit”
  4. Click “New” and add the following paths in order (adjust to match your actual installation location):
    D:\Miniconda3
    D:\Miniconda3\Library\bin
    D:\Miniconda3\Scripts
    D:\Miniconda3\condabin
    
    Anaconda usersReplace Miniconda3 with Anaconda3 in the paths above.
  5. Click “OK” repeatedly to close all windows
  6. Reopen the terminal and run conda --version to verify

Q: CommandNotFoundError after activating an environment?

A: This is commonly caused by PowerShell’s execution policy blocking conda’s initialization script. Run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Then reopen PowerShell.

Q: conda install is extremely slow at dependency resolution (Solving environment)?

A: This is a classic conda pain point. Solutions:
  1. Use the libmamba solver (built in for conda >= 22.11):
    conda config --set solver libmamba
    
  2. Set strict channel priority (reduces the search scope):
    conda config --set channel_priority strict
    
  3. Avoid installing packages in the base environment: Keep base clean and create a separate environment for each project.

Q: CondaHTTPError during installation or update?

A: This is usually a network or proxy configuration issue. Set a proxy in .condarc:
.condarc
proxy_servers:
  http: http://proxy.example.com:8080
  https: https://proxy.example.com:8080

Q: Can Anaconda and Miniconda be installed at the same time?

A: Technically yes, but it is strongly not recommended. Both share the same conda core, and having both installed causes PATH and environment variable conflicts. Choose one.

Q: How do I uninstall?

A: Refer to the official uninstall guides: