Downloading Anaconda
- Access the Anaconda Website: Visit the Anaconda download page.
- Choose the Correct Version: Select the version suitable for your operating system (Windows, macOS, or Linux).
- Download the Installer: Click on the download link to get the installer.
Installing Anaconda
- Run the Installer: Execute the downloaded installer file.
- Accept the License Agreement: Follow the prompts to accept the terms.
- Choose Installation Type: Select “Just Me” for a user-specific installation.
- 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:
- Open System Properties: Right-click on “This PC” or “Computer,” then select “Properties.”
- Advanced System Settings: Click on “Advanced system settings” on the left.
- Environment Variables: Click on “Environment Variables.”
- Edit Path Variable: Under “System Variables,” scroll down and find the “Path” variable, then click “Edit.”
- New Path Entry: Click “New” and enter the path to the Anaconda bin directory (e.g.,
C:\Users\YourUsername\Anaconda3\Scripts
). - Apply Changes: Click “OK” on all windows.
For macOS/Linux:
- Open Terminal: Open your terminal application.
- Edit Shell Configuration: Use a text editor to open your shell configuration file (e.g.,
~/.bashrc
or~/.zshrc
). - Add Path Entry: Add the following line at the end of the file:bash
export PATH="/path/to/anaconda/bin:$PATH"
Replace/path/to/anaconda/bin
with the actual path to your Anaconda bin directory. - Save and Reload: Save the file and reload your shell configuration by running
source ~/.bashrc
(orsource ~/.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.