Log In

Install Miniconda on Ubuntu 22.04

Install Miniconda on Ubuntu 22.04
10.04.2024
Reading time: 4 min
Hostman Team
Technical writer

The way Python developers manage environments and dependencies is being revolutionized by Miniconda, a flexible package management system. Miniconda, in contrast to its more expansive sibling, Anaconda, takes a more simplified approach, concentrating just on supplying the necessary elements for effective Python package management. Because of its lightweight design, it's the perfect option for developers that want control and flexibility in their work environments.

Users may quickly and easily establish isolated Python environments with Miniconda, each one customized to meet the needs of a particular project. This feature prevents conflicts between various package versions and guarantees project reproducibility. Furthermore, Miniconda makes it easier to install, update, and remove packages, enabling developers to quickly adjust to changing project requirements.

Here’s how to install Miniconda on Ubuntu 22.04.

Prerequisites

  • System running in Ubuntu 22.04. You can deploy and use Ubuntu on our cloud server.

  • Root access or user with sudo privilege

  • At least 400MB space for the installer

Once all requirements are met, proceed with installation of Miniconda.

Installing Miniconda

  1. Download the installer from the official Miniconda website.

The installer can be directly downloaded to the server. Launch the terminal and run the command below:

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

Image5

Wait for the download to be 100% completed and verify if the file is saved in the correct directory. To do this, run the command below to check your current directory: 

pwd

Image11

And then:

ls -lrt

The installer name (Miniconda3-latest-Linux-x86_64.sh) should display on the output. This will confirm that the file was downloaded successfully. 

1

Check the integrity of the downloaded installer by getting sha256sum.

Use the command:

sudo sha256sum  Miniconda3-latest-Linux-x86_64.sh

Image9

Compare the data with the official website of Miniconda, if they are matched, the installer is intact/original and you can proceed with the installation. If not matched, the installer needs to be redownloaded.

Image8

  1. We are now ready for the installation. Login to the terminal and run the command:

sudo bash Miniconda3-latest-Linux-x86_64.sh

Follow the prompt on the installer screen then hit Enter to continue. 

Fe2ec252 B6fe 421d B38a D9fd994cd176

  1. Accept the license terms by typing yes.

Image7

  1. The path where Miniconda will be installed will be shown on the screen. Take note of this path location as this will be used to run Miniconda commands. Press Enter to proceed. 

Image4

  1. Wait for the installation to complete.

  2. Auto start up is activated by default after the installation. It can be disabled using the command:

sudo conda config  --set auto_activate_base false

Then type no to end the installation.

Image12

This completes the Miniconda installation process. To test your installation, use the command:

sudo /root/miniconda3/bin/conda list 

A list of installed packages appears if Conda has been installed appropriately.

Image6

Uninstalling Miniconda

Miniconda can be uninstalled by just deleting the folder created in step 4 of the installation. In this case it is /root/miniconda3.

Delete the directory by running the command:

sudo rm -rf /root/miniconda3

Miniconda will be uninstalled. 

Conclusion

To conclude, setting up Miniconda on Ubuntu 22.04 is a simple procedure that gives developers access to a strong yet lightweight tool for controlling Python environments and dependencies. You can easily set up Miniconda and take advantage of its enormous potential to improve your development workflow by following our step-by-step instructions. Miniconda guarantees project reproducibility and flexibility by effectively managing package installations and generating isolated environments. Take advantage of Miniconda's ease of use and productivity today, and use Ubuntu 22.04 to start your path to more efficient and effective Python development.


Share