How to Install Miniconda on Ubuntu 22.04: A Step-by-Step Guide

In this guide, we’ll walk you through the process of installing Miniconda on Ubuntu 22.04, a streamlined version of Anaconda that includes only the essentials: conda, Python, and a few key packages like pip and zlib. If you’re looking for a lightweight environment management solution, Miniconda is an excellent choice.

Prerequisites

Before you begin, ensure you have the following:

  • Ubuntu 22.04 installed on your server.
  • A user account with administrative privileges.

Step 1: Update Your System

First, make sure your system is up-to-date. Run the following command:

sudo apt update

Step 2: Download the Miniconda Installer

Next, download the Miniconda installer script directly from the official Miniconda website. Use the command below:

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

Step 3: Install Miniconda on Ubuntu

For a faster and more streamlined installation, you can perform a silent install by adding the -b flag to the installation command. This bypasses the usual prompts, including the license agreement. If you prefer to specify a different installation directory instead of the default home directory, use the -p option followed by the desired path.

bash Miniconda3-latest-Linux-x86_64.sh -b

Example Output:


PREFIX=/home/admin/miniconda3
Unpacking payload ...

Installing base environment...

Downloading and Extracting Packages

Preparing transaction: done
Executing transaction: done
Installation finished.
    

Step 4: Initialize Miniconda

To begin using Miniconda, activate the environment with the following command:

source /home/admin/miniconda3/bin/activate

(Note: Replace /home/admin/miniconda3/ with the correct path if it’s different on your system.)

Next, initialize Miniconda by running:

conda init

You may need to exit your terminal session and reconnect for the changes to take effect.

Step 5: Verify Your Installation

Finally, let’s confirm that Miniconda was installed successfully.

Check the installed version:

conda -V

View the list of programs installed by Miniconda:

conda list

And that’s it! You’ve successfully installed Miniconda on your Ubuntu 22.04 server.

Facebook
Pinterest
Twitter
LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *