Skip to main content

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

  1. Open your web browser.
  2. Go to the official download page:
    https://www.anaconda.com/download
  3. Choose the correct installer for your operating system (Windows, macOS, Linux).
  4. Select the latest Python 3.x version.

3. Installing on Windows

  1. Run the downloaded .exe installer.
  2. 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).
  3. Click Install and wait.
  4. After installation, open Anaconda Navigator from the Start Menu.

4. Installing on macOS

  1. Open the .pkg installer you downloaded.
  2. Follow the installation prompts.
  3. Alternatively, use Homebrew:
brew install --cask anaconda
  1. After installation, initialize conda:
conda init zsh

(If you use Bash: conda init bash)

  1. Restart Terminal.

5. Installing on Linux

  1. Download the .sh installer from the Anaconda website.
  2. Open Terminal and navigate to the Downloads folder.
  3. Run the installer:
bash Anaconda3-2023.x-Linux-x86_64.sh
  1. Follow the prompts:
    • Press Enter to scroll through the license.
    • Type yes to accept.
    • Choose installation directory (default is fine).
  2. Initialize conda:
source ~/anaconda3/bin/activate
conda init
  1. 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.