How to Install Anaconda on Ubuntu – A Complete Setup Guide for Python & Data Science

Comentarios · 214 Vistas

Anaconda is one of the most powerful and popular platforms for data science, machine learning, and scientific computing. If you work with Python or R, you’ve likely heard of Anaconda. It bundles everything you need — from interpreters and libraries to environment managers — into one

Anaconda is one of the most powerful and popular platforms for data science, machine learning, and scientific computing. If you work with Python or R, you’ve likely heard of Anaconda. It bundles everything you need — from interpreters and libraries to environment managers — into one user-friendly package. This blog explains how to install Anaconda on Ubuntu, with steps based on the official Vultr guide

Ubuntu, being a widely-used Linux distribution, is the perfect OS to run Anaconda. Whether you're a data scientist, software developer, or student, setting up Anaconda on Ubuntu will help streamline your development workflow.

What Is Anaconda?

Anaconda is an open-source distribution of Python and R programming languages designed for data science and machine learning. It includes:

  • Conda – a powerful package and environment manager

  • Jupyter Notebook – an interactive coding and documentation tool

  • Spyder IDE – a lightweight scientific development environment

  • Pre-installed libraries like NumPy, pandas, scikit-learn, matplotlib, and more

With Anaconda, you don’t have to install each package manually or worry about dependency issues. It’s a plug-and-play setup for data projects.

Why Install Anaconda on Ubuntu?

Ubuntu offers a robust, secure, and user-friendly environment for developers. Installing Anaconda on Ubuntu ensures:

  • Smooth management of multiple Python environments

  • Quick deployment of scientific libraries

  • Reduced conflicts with system Python

  • Integration with IDEs like VSCode and Jupyter

  • Access to over 7,500 open-source packages

Prerequisites

Before you install Anaconda on Ubuntu, make sure you:

  • Have a running instance of Ubuntu 20.04 or 24.04

  • Have sudo privileges or root access

  • Have at least 3GB of free disk space

  • Are connected to the internet

 How to Install Anaconda on Ubuntu (Step-by-Step)

Below are the simplified steps adapted from Vultr’s guide.

Step 1: Update Your Ubuntu System

Start by updating your system’s package index to ensure you're working with the latest versions:

sudo apt update && sudo apt upgrade -y



Step 2: Download the Anaconda Installer Script

Use the wget command to download the Anaconda installer:

 

Make sure to check Anaconda’s official site for the latest version if needed.

 

Step 3: Verify the Installer (Optional)

You can verify the integrity of the installer with:

sha256sum Anaconda3-2024.05-1-Linux-x86_64.sh

 

Compare it with the checksum provided on Anaconda’s website.

 

Step 4: Run the Installer Script

Execute the downloaded script:

bash Anaconda3-2024.05-1-Linux-x86_64.sh

 

Follow the on-screen instructions:

  • Press Enter to review the license

  • Type yes to accept it

  • Choose an install location (default is usually fine)

Step 5: Activate Anaconda

Once the installation is complete, activate Anaconda with:

source ~/.bashrc

 

Check if Anaconda is correctly installed by running:

conda --version

 

Getting Started with Anaconda

Here are a few useful commands to get started:

Create a new environment:

conda create -n myenv python=3.12

conda activate myenv

  • Launch Jupyter Notebook:

    jupyter notebook

  • Update all packages:

    conda update --all

  • List environments:

    conda info --envs

 

Conclusion

Installing Anaconda on Ubuntu is a smart choice if you’re serious about data science, machine learning, or Python development. It streamlines package management, environment creation, and project execution. In just a few steps, you can set up a fully functional development environment ready to handle any data task.

Have you installed Anaconda on Ubuntu? Share your setup tips or questions in the comments below!

 

Comentarios