Setting Up Anaconda for AI Development

Downloading Anaconda

  1. Access the Anaconda Website: Visit the Anaconda download page.
  2. Choose the Correct Version: Select the version suitable for your operating system (Windows, macOS, or Linux).
  3. Download the Installer: Click on the download link to get the installer.

Installing Anaconda

  1. Run the Installer: Execute the downloaded installer file.
  2. Accept the License Agreement: Follow the prompts to accept the terms.
  3. Choose Installation Type: Select “Just Me” for a user-specific installation.
  4. Choose Installation Location: Pick a location with sufficient space (about 5GB).

Adding Conda to PATH Environment Variable

Note: It is generally recommended not to add Anaconda to your system’s PATH variable during installation to avoid potential conflicts with other Python installations. However, if you still want to add it manually, follow these steps:

For Windows:

  1. Open System Properties: Right-click on “This PC” or “Computer,” then select “Properties.”
  2. Advanced System Settings: Click on “Advanced system settings” on the left.
  3. Environment Variables: Click on “Environment Variables.”
  4. Edit Path Variable: Under “System Variables,” scroll down and find the “Path” variable, then click “Edit.”
  5. New Path Entry: Click “New” and enter the path to the Anaconda bin directory (e.g., C:\Users\YourUsername\Anaconda3\Scripts).
  6. Apply Changes: Click “OK” on all windows.

For macOS/Linux:

  1. Open Terminal: Open your terminal application.
  2. Edit Shell Configuration: Use a text editor to open your shell configuration file (e.g., ~/.bashrc or ~/.zshrc).
  3. Add Path Entry: Add the following line at the end of the file:bashexport PATH="/path/to/anaconda/bin:$PATH" Replace /path/to/anaconda/bin with the actual path to your Anaconda bin directory.
  4. Save and Reload: Save the file and reload your shell configuration by running source ~/.bashrc (or source ~/.zshrc).

Activating Conda Environments

To use Conda environments effectively, you should activate them instead of modifying the system PATH. You can activate an environment using:

$ conda activate myenv

Replace myenv with the name of your environment. This ensures that the environment’s Python and packages are used without affecting the system-wide PATH.