8. Installing and Configuring Anaconda
1. Introduction
Anaconda is a Python distribution widely used for data science, machine learning, and scientific computing.
It comes bundled with Python, Jupyter Notebook, and many popular libraries (NumPy, Pandas, Matplotlib).
Using Anaconda makes it easier to manage packages and environments.
2. Downloading Anaconda
- Open your web browser.
- Go to the official download page:
https://www.anaconda.com/download - Choose the correct installer for your operating system (Windows, macOS, Linux).
- Select the latest Python 3.x version.
3. Installing on Windows
- Run the downloaded
.exeinstaller. - Follow the setup wizard:
- Accept the license.
- Choose Install for Just Me (recommended).
- Keep the default install location.
- ✅ Check Add Anaconda to PATH (or let the installer manage PATH).
- Click Install and wait.
- After installation, open Anaconda Navigator from the Start Menu.
4. Installing on macOS
- Open the
.pkginstaller you downloaded. - Follow the installation prompts.
- Alternatively, use Homebrew:
brew install --cask anaconda
- After installation, initialize conda:
conda init zsh
(If you use Bash: conda init bash)
- Restart Terminal.
5. Installing on Linux
- Download the
.shinstaller from the Anaconda website. - Open Terminal and navigate to the Downloads folder.
- Run the installer:
bash Anaconda3-2023.x-Linux-x86_64.sh
- Follow the prompts:
- Press Enter to scroll through the license.
- Type
yesto accept. - Choose installation directory (default is fine).
- Initialize conda:
source ~/anaconda3/bin/activate
conda init
- Restart your shell.
6. Verifying Installation
Check conda version:
conda --version
Check Python version inside conda:
python --version
7. Updating Anaconda
Keep Anaconda up to date:
conda update conda
conda update anaconda
8. Creating and Managing Environments
Create a new environment with Python 3.12:
conda create -n myenv python=3.12
Activate it:
conda activate myenv
Deactivate:
conda deactivate
Remove environment:
conda remove -n myenv --all
9. Using Anaconda Navigator
- Navigator is a graphical tool included with Anaconda.
- It lets you:
- Launch Jupyter Notebook.
- Install and update packages.
- Manage environments visually.
Launch it from Start Menu (Windows), Launchpad (macOS), or type:
anaconda-navigator
10. Troubleshooting
- conda command not found: Restart your terminal, or add Anaconda to PATH manually.
- Slow package installs: Use conda-forge channel:
conda install -c conda-forge <package-name>
- Conflicts during updates: Create a fresh environment instead of upgrading the base environment.
11. Next Steps
✅ Anaconda is now installed and configured.
In the next chapter, we will explore other IDEs and editors you can use for Python development.