Debian

How to Install Miniconda on Debian 12

Miniconda is a minimal version of the Anaconda Python distribution. It does not come with all the packages that come with Anaconda Python by default. But you can install any Python package that you want from the Anaconda Python package repository. So, Miniconda is a good choice if you want to conserve the disk space and don’t mind installing the required Python packages manually when you need them.In this article, we will show you how to download and install Miniconda on the Debian 12 “Bookworm”.

Topic of Contents:

  1. Downloading Miniconda on Debian 12
  2. Installing Miniconda on Debian 12
  3. Checking the Version of the Installed Miniconda on Debian 12
  4. Activating the Miniconda Environment on Debian 12
  5. Deactivating the Miniconda Environment on Debian 12
  6. Conclusion

Downloading Miniconda on Debian 12

To download the Miniconda installer for Debian 12, visit the official downloads page of Miniconda from your favorite web browser.

Once the page loads, scroll down a little and click on “Miniconda3 Linux 64-bit” link from the “Linux” section as marked in the following screenshot:

A screenshot of a computer Description automatically generated

Your browser should start downloading the Miniconda Linux installer file. It takes a few seconds to complete.

A screenshot of a computer Description automatically generated

At this point, the Miniconda Linux installer file should be downloaded.

A screenshot of a computer Description automatically generated

Installing Miniconda on Debian 12

Once the Miniconda Linux installer file is downloaded, you will find it in the ~/Downloads directory of Debian 12.

$ cd ~/Downloads

$ ls -lh

A screenshot of a computer Description automatically generated

To add an executable permission to the Miniconda Linux installer file, run the following command:

$ chmod +x Miniconda3-latest-Linux-x86_64.sh

An executable permission should be added to the Miniconda Linux installer file.

$ ls -lh

A screenshot of a computer Description automatically generated

To install Miniconda on Debian 12 using the Miniconda Linux installer file, run the following command:

$ ./Miniconda3-latest-Linux-x86_64.sh

Press <Enter>.

A screenshot of a computer Description automatically generated

The Miniconda license agreement should be displayed.

Press “q” to continue.

A screenshot of a computer Description automatically generated

To accept the Miniconda license agreement, type in “yes” and press <Enter>.

A screenshot of a computer Description automatically generated

Press <Enter> to accept the default installation location of Miniconda.

NOTE: If you want to install Miniconda somewhere else, type in the full path of the directory where you want to install Miniconda and press <Enter>.

A screenshot of a computer Description automatically generated

Miniconda is being installed. It takes a few seconds to complete.

A screenshot of a computer Description automatically generated

If you want to initialize Miniconda when you open a Terminal app by default, type in “yes” and press <Enter>.

If you want to initialize Miniconda manually only when you need it, type in “no” and press <Enter>.

A screenshot of a computer Description automatically generated

Miniconda should be installed on Debian 12.

A screenshot of a computer Description automatically generated

Checking the Version of the Installed Miniconda on Debian 12

Once Miniconda is installed, you can run the following command to check whether you can access Miniconda and the version of Miniconda that you installed.

$ conda --version

As you can see, we installed Miniconda version 23.5.2. You have most likely installed an updated version of Miniconda by the time you read this article.

Activating the Miniconda Environment on Debian 12

To activate the Miniconda environment on Debian 12, open a Terminal app and run the following command:

$ conda activate

Deactivating the Miniconda Environment on Debian 12

To deactivate the Miniconda environment on Debian 12, open a Terminal app and run the following command:

$ conda deactivate

Conclusion

We showed you how to download Miniconda and install it on Debian 12. We also showed you how to activate and deactivate the Miniconda environment on Debian 12.

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.