How to install Anaconda on Debian 10 or 11 Bullseye

Let’s learn the commands to install Anaconda Navigator on Debian 11 or 10 and also how to create a desktop shortcut for the same.

Anaconda is a Python distribution, which is designed for scientific work and the analysis of (large) amounts of data. Anaconda is free and also consists of free & Open source software – however, the company behind this Data Science platform also offers additional commercial support. It is available in Individual, Commerical, and Enterprise editions.  Anaconda has everything you need, including the Python interpreter. This makes it independent of the underlying system.

However, it does not contain any Python modules that cannot be installed in other ways such as package management or pip. The advantage of Anaconda is that you don’t have to worry about resolving the sometimes complex dependencies yourself. Anaconda also has its own package manager called Conda, which keeps all packages within the distribution up to date.

Steps to Install Anaconda Navigator on Debian 11 or 10

1. Download Anaconda Python Installer

Go to the official website of Anaconda and visit the Download page, alternatively, you can use this link…  There under Linux, select 64-Bit (x86) Installer.  This will pop up a file to save on your system.

Download Anaconda python for Debian 11

 

2. Run Anaconda Installation script on Debian 11 or 10

Once the downloading of the file is completed. Open your command terminal and use the below commands to start the installer. As whatever we get from browser save in Downloads folder, thus first we switch to that-

cd Downloads

Run script

sudo sh Anaconda3-*.sh

Anaconda install script on Debian 11

Accept the Terms and conditions. Follow the Text-based installation wizard, let the default entries or settings as it is, just hit the Enter key.

When it asks to enter the path to extract Anaconda3,  type- /home/your-user/anaconda3 . Change your-user with the system standard user, not the root.

Example: Here h2s is our user name.

Set path to extract Anadcona

 

3. Add Environment variable for Anaconda

Next, we need to add the folder path of the extracted Anaconda in our system path, so that we can easily access its command without switching to its directory from anywhere in the terminal.

echo "export PATH=$PATH:/home/h2s/anaconda3/bin">> ~/.bashrc

Replace h2s in the above command with your Debian user name.

 

4. Reload Shell

To start using Anaconda without logging out while maintaining the state of the Current Shell or terminal; reload the bash, in simple words reload your profile without restarting or logging out the session.

source ~/.bashrc

 

5. Test Installation using Conda package manager

Use the Conda command to know whether the Anaconda is working fine on your system:

conda list

Conda command

 

6. Create New Environment on Debian 11 using the shell command

If you want to set up a new Anaconda environment for your project, then use the command

conda create

So, for example, if we want to create an environment with Python with a name let’s say: “firstenv“, so that command will be:

conda create -n firstenv

Now, we already have the Anaconda Environment, to install any package in that, the command syntax will be like this:

Syntax:

conda install -n firstenv packag-name

Let’s say you want to install Pythion and NumPy in your environment-

conda install -n firstenv python numpy

In this way, we can install whatever available packages we want. Also to activate the environment and start working with it.

conda activate firstenv

To deactivate

conda deactivate

 

7. Anaconda Navigator GUI on Debian 10 or 11

Now, those who want to work in Anaconda but with a Graphical user interface can go for Navigator. It comes along with the installation of this Data Science and analytical platform.

To use it, in your command terminal run-

anaconda-navigator

Anaconda Navigator GUI Debian 11 or 10

8. Desktop Shortcut (optional)

Step 1: Open the command terminal on your Debian 11 0r 10  or any other Linux system you are using.

Step 2: Switch to the Desktop directory by using the command:

cd Desktop

Step 3: Now create a file for the Anaconda Desktop shortcut, for that we are using the default nano editor of Ubuntu Linux.

nano anaconda.desktop

Step 4: You will see a text editor, where copy-paste the following text:

[Desktop Entry]
Version=1.0
Type=Application
Name=Anaconda
Exec=/home/h2s/anaconda3/bin/anaconda-navigator
Icon=/home/h2s/anaconda3/lib/python3.8/site-packages/anaconda_navigator/app/icons/Icon1024.png
Terminal=false

Note: Replace h2s with your username and also replace the python version you have inside the Anaconda3’s lib folder.

Save the file by pressing  Ctrl+X, type- Y, and hit the Enter key.

Also, copy the same for the launcher-

sudo cp ~/Desktop/anaconda.desktop /usr/share/applications/

 

Other Articles:

 

 

1 thought on “How to install Anaconda on Debian 10 or 11 Bullseye”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.