Anaconda

From Sustainability Methods
Revision as of 14:09, 12 August 2024 by Gustavo (talk | contribs)

THIS ARTICLE IS STILL IN EDITING MODE.

1. What is a Python Distribution?

A Python distribution is a pre-packaged set of tools for using Python. It includes the core Python language, along with additional libraries and programs that make it easier to write and run Python code almost immediately. There are severall python distributions such as PyPy, ActivePython and Anaconda, being the latter the most used for data science work.

2. What is Anaconda?

Source: wikimedia.org

Anaconda Distribution is a popular, free, and open-source distribution of data science programming languages. It's designed to simplify package management and deployment for scientific computing, data science, machine learning, and large-scale data processing. Anaconda comes with over 1,500 pre-installed packages, including popular libraries like Pandas, Numpy and built-in integrated development environments (IDE) such as Jupyter Lab, Rstudio, PyCharm, Visual Studio Code, among others.

3. Key Features

  • User-Friendly Interface: Anaconda Navigator provides a graphical interface to manage packages and environments, making it beginner-friendly.
  • Package Management: Anaconda includes conda, a package manager that makes it easy to install, update, and remove packages and dependencies.
  • Environment Management: You can create isolated virtual environmentsto manage different projects with different dependencies without conflicts.
  • Cross-Platform: Available for Windows, macOS, and Linux.

Data science and machine-learning packages: As of June 2024, Anaconda comes with over 8000 popular open-source data science packages, including NumPy, pandas, matplotlib, and Jupyter Notebook, saving you the hassle of installing them individually

4. How to install Anaconda on my machine

Anaconda Distribution can be installed free of charge for private use for Windows, macOS and Linux. The newest version currently features Python 3.9.

Its installation process is straight forward: Download the installation file, choose a path and follow the steps. No account is needed. As a student you can choose to sign up for Anaconda Nucleus for “Community membership, unlimited environment backups (and) exclusive data science content” (4) for free.

Click here to directly download the installer for your operating system. For Windows and MacOS, graphical installers are provided. For Linux, there are only installation scripts that have to be run from the terminal.

For an in-depth description and links to download Anaconda for older operating systems, you can make use of their extensive documentation.

If a more minimalistic approach is preferred, Miniconda can be installed. This version just includes conda, Python and necessary dependencies: Install Miniconda

In case of issues during the installation process, please refer to the help page.

5. Using Conda

Conda is a command line tool used in a terminal to interact with Anaconda. It is a package and environment management software. It can be used to install or update packages, create, save and load environments. To start using conda, open a terminal, type conda and press enter.

To open a terminal on windows, press CTRL + R, type cmd. exe (write this without a space, we're sorry, this is due to Wiki formatting) and press enter. On macOS, open launcher and type terminal into the search box, clicking the icon when it appears. On Linux, the shortcut Super + T should do the job, otherwise it can be found in the applications menu.

6. Using Anaconda Navigator

Anaconda Navigator is a desktop application to manage environments and packages via a graphical user interface rather than the conda command line interface. It is automatically installed with Anaconda Distribution version 4.0.0 or higher. In the left column of the Navigator you can switch between the program's four main components. On the Learning page and Community page you can access documentation and training related to the Navigator and find out about support forums and social networking activities in the field. The following section describe in more depth the Home page and the Environments page that allow you to manage applications and environments.

Home page

On the Home page, you can launch and install applications in the active environment by clicking the respective button on one of the application tiles. Additionally, you can use the gear icon in the top-right corner of the tiles to update, remove, or install a specific version of an application. Note that these actions will only apply to the currently-active environment, which you can select with the Applications on drop-down located on top of the tiles menu. Two important built-in applications are Spyder for writing and executing code and Jupyter Notebook for generating notbooke files. The Anaconda documentation includes a comprehensive list of all applications that are included by default and instructions on how to build your own Navigator applications.

Environments page

The Environments page, like Conda, allows you to create and activate environments as well as install, update, and remove packages.

Create an environment

Click on the Create button at the bottom of the Environments list. A dialog box appears where you can name your environment and select the versions of Python and/or R you want to work with. You can also choose to import an environment from your local drive or Anaconda Nucleus (Import button) or clone an existing environment (Clone button).

Activate the environment

In the environments list in the left column, click on the arrow button next to the name to activate the environment you want to use.

Installing, updating and removing packages

By default, the right table displays all packages that are installed in the active environment. You can use the filter on top of the list to view not installed, updatable, selecte, or all packages instead. Note that you can use the Channels button to adjust the locations where Navigator searches for packages. See Managing channels for further information on channels. To install a new package, click the Apply button for an uninstalled package. To update a package, remove a package or install a different package version, click on the checkbox infront of the package name, select the respective action, and click Apply.

If you run into problems or want to explore the functions of Anaconda Navigator further, you can access the documentation via the Help button in the top-left corner of the Navigator.

References

(1) https://www.anaconda.com/

(2) https://www.anaconda.com/products/distribution

(3) https://docs.anaconda.com/navigator/overview/

(4) https://www.anaconda.com/pricing#

(5) https://www.dominodatalab.com/data-science-dictionary/anaconda/

Authors: Carlo Krügemeier, Joldon, Gustavo Rodriguez