This guide provides a detailed walkthrough for installing Anaconda on Windows, including configuration steps and managing multiple Python installations.
Installation Process
After downloading the Anaconda installer, double-click the executable to begin. Follow the installation wizard, paying attention to the following key steps:
- Accept the license agreement
- Choose installation location (default is recommended)
- Select "Add Anaconda to my PATH environment variable" (important for command line access)
- Complete the installation
Verifying Installation
Open Command Prompt and run:
conda --version
A successful installation will display the Conda vertion number.
Configuring Mirror Sources
To speed up package downloads in China, configure Conda to use Tsinghua University mirrors:
Method 1: Command Line Configuration
Run these commands sequentially:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
Method 2: Manual File Editing
Navigate to your user directory (e.g., C:\Users\YourUsername) and edit the .condarc file with this content:
ssl_verify: true
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- defaults
show_channel_urls: true
Package Updates
Update Conda and all packages (recommended for stability):
conda update conda
conda upgrade --all
Managing Multiple Python Installations
Method 1: Renaming Executables
If you have an existing Python installation, rename the executables to avoid conflicts:
- Rename original Python:
python.exe→python_orig.exe - Rename Anaconda Python:
python.exe→python_ana.exe
Usage example for package installation:
python_orig -m pip install package_name
python_ana -m pip install package_name
Method 2: Virtual Environments (Recommended)
View existing environments:
conda info -e
Create a new environment with specific Python version:
conda create -n custom_env python=3.7
Activate the environment:
conda activate custom_env
To use your original Python installation within Conda:
- Create a folder in
Anaconda3\envs\(e.g.,python_original) - Copy your original Python installation to this folder
- Activate using:
conda activate python_original