Skip to main content

QUICK START

tip

Creating a new environment is advised for each new project or workflow.

Verifyingโ€‹

Environmentsโ€‹

Setting Up Anaconda: A Comprehensive Guide

Anaconda is a powerful tool for managing Python packages and environments, widely used in data science, machine learning, and scientific computing. In this guide, we'll walk through the steps to set up Anaconda on your system.

What is Anaconda?โ€‹

Anaconda is a distribution of the Python and R programming languages for scientific computing, data analysis, and machine learning. It includes a package manager, environment manager, and a collection of pre-installed libraries and tools. Anaconda simplifies the process of installing and managing dependencies for data science projects.

Installationโ€‹

Step 1: Download Anacondaโ€‹

Visit the Anaconda website (https://www.anaconda.com/products/distribution) and download the appropriate version for your operating system (Windows, macOS, or Linux).

Step 2: Install Anacondaโ€‹

Once the download is complete, follow the installation instructions for your operating system. The installation wizard will guide you through the process, allowing you to choose installation options and specify the installation directory.

Step 3: Verify Installationโ€‹

After installation, open a terminal or command prompt and type conda --version. If Anaconda is installed correctly, you should see the version number displayed in the output.

Using Anacondaโ€‹

Managing Environmentsโ€‹

Anaconda allows you to create isolated Python environments, each with its own set of packages and dependencies. This is useful for managing project dependencies and avoiding conflicts between packages.

Creating an Environmentโ€‹

To create a new environment, use the following command:

conda create --name myenv

Replace myenv with the name of your environment. You can also specify the Python version and additional packages to install:

conda create --name myenv python=3.8 numpy pandas

Activating an Environmentโ€‹

To activate an environment, use the following command:

conda activate myenv

Deactivating an Environmentโ€‹

To deactivate the current environment, simply use the following command:

conda deactivate

Installing Packagesโ€‹

Anaconda comes with its own package manager called conda, which makes it easy to install, update, and remove packages.

Installing a Packageโ€‹

To install a package, use the following command:

conda install package_name

Replace package_name with the name of the package you want to install.

Updating a Packageโ€‹

To update a package to the latest version, use the following command:

conda update package_name

Removing a Packageโ€‹

To remove a package, use the following command:

conda remove package_name

Managing Environments with Anaconda Navigatorโ€‹

Anaconda Navigator is a graphical user interface (GUI) that allows you to manage environments, packages, and projects using a visual interface.

Launching Anaconda Navigatorโ€‹

To launch Anaconda Navigator, simply type the following command in your terminal or command prompt:

anaconda-navigator

Testโ€‹

DescriptionCommand

Update conda in base environment

conda update --all -n base

Verify conda install and check version

conda info

List installed of packages

conda env list

Create a new environment (myenv).

conda create --name myenv

Update environment in (myenv).

conda update --all -n myenv

Remove all unused files

conda clean --all