Debian

How to Install Anaconda Python on Debian 12

Anaconda is a Python distribution just like Ubuntu is a Linux distribution. Anaconda comes pre-installed with all the data science and machine learning tools. So, you don’t have to waste time in installing those tools separately on your computer. It’s great for data scientists and ML beginners and experts.

In this article, we will show you how to download the Anaconda Python on Debian 12. We will also show you how to install the Anaconda Python on Debian 12 and how to activate/deactivate the default Anaconda Python environment as well.

Topic of Contents:

    1. Downloading the Anaconda Python for Debian 12
    2. Installing Anaconda Python on Debian 12
    3. Checking If Anaconda Python Is Installed on Debian 12
    4. Activating the Anaconda Python Environment Manually on Debian 12
    5. Conclusion

Downloading the Anaconda Python for Debian 12

To download the Anaconda Python installer for Debian 12, visit the official website of Anaconda with your favorite web browser.

Once the page loads, click on “Download”.


Your browser should start downloading the Anaconda Python installer for Linux. It takes a while to complete.


At this point, the Anaconda Python installer for Linux should be downloaded.

Installing Anaconda Python on Debian 12

Once the Anaconda Python installer for Linux is downloaded, you can find it in the ~/Downloads directory of Debian 12.

$ ls -lh ~/Downloads

 

To make the Anaconda Python Linux installer file executable, run the following command:

$ sudo chmod +x ~/Downloads/Anaconda3-2023.03-1-Linux-x86_64.sh

 
To install Anaconda Python on Debian 12, run the following command:

$ ~/Downloads/Anaconda3-2023.03-1-Linux-x86_64.sh

 
Then, press <Enter>.


Anaconda Python license agreement should be displayed. You can press <Space> to read it.

To continue the installation of Anaconda Python on Debian 12, press “Q”.


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


By default, Anaconda is installed in the anaconda3/ directory of your login user’s home directory. If you want to install the Anaconda Python in a different location, type it in.

Once you’re done, press <Enter>.


Anaconda Python is being installed. It will take a few seconds to complete.


If you want the Anaconda Python to be initialized when you open a new Terminal app, type in “yes” and press <Enter>.

If you want to initialize the Anaconda Python only when you need it, type in “no” and press <Enter>. If you decide to go with this option, read the section on Activating the Anaconda Python Environment Manually on Debian 12 of this article to learn how to activate/deactivate the Anaconda Python on Debian 12.


Anaconda Python should be installed on your Debian 12 machine.

Checking If Anaconda Python Is Installed on Debian 12

To confirm if Anaconda Python is installed and working on Debian 12, open a new Terminal app.

If you configured the Anaconda Python to initialize automatically, you will see the default Anaconda Python environment name base before the terminal prompt as marked in the following screenshot:


If you didn’t configure the Anaconda Python to auto-initialize, run the following command to check whether you can access the Anaconda Python:

$ conda --version

 
If you can access the Anaconda Python, the version number of Anaconda Python that you installed on your Debian 12 machine should be displayed.

Activating the Anaconda Python Environment Manually on Debian 12

To manually activate the default Anaconda Python environment which is “base” on Debian 12, open a Terminal app and run the following command:

$ conda activate

 
The default Anaconda Python environment base should be activated.


Once you’re done working with Anaconda Python, you can deactivate the Anaconda Python environment with the following command:

$ conda deactivate

 

Conclusion

In this article, we showed you how to download the Anaconda Python on Debian 12. We also showed you how to install the Anaconda Python on Debian 12 and how to activate/deactivate the default Anaconda Python environment as well.

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.