Skip to content

How to Install Anaconda on Ubuntu 22.04

How to Install Anaconda on Ubuntu 22.04
What is Anaconda?

Anaconda is a popular Python package distribution that has a wide range of scientific computing, data analysis, and machine learning packages. It also has the conda package manager, which makes it easy to install, update, and manage the installed packages. In this tutorial, we will guide you on how to install Anaconda on Ubuntu 22.04 LTS ( server or desktop) and also how to remove it.

Anaconda requirements:

  • A running Ubuntu 22.04 system with root access
  • A basic understanding of the terminal and Linux commands
How do I install Anaconda on ubuntu 22.04 | 20.04 | 18.04?

Here’s the step-by-step tutorial for installing anaconda on ubuntu 22.04:

[optional] Step 0: install miniconda ubuntu server:

Open your terminal by pressing ctrl + alt + t and type the details

ssh <username>@<server_ip> #ssh jbidyut@192.168.1.1

after that enter the password, and that’s it.

[optional] Step 0: Download anaconda dependencies

In order to utilize graphical user interface (GUI) packages on a Linux-based system, it is necessary to install the required dependencies for Qt and to download and install anaconda ubuntu.

sudo apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6

Step 1: Download anaconda ubuntu 22.04

Go to the official anaconda website and download the Anaconda3-xxxx.xx-Linux-x86_64.sh file

install anaconda ubuntu command line

Step 3: Install anaconda ubuntu terminal

To install anaconda linux command line run the files using bash commnad

cd ~/Downloads
bash Anaconda3-2023.03-Linux-x86_64.sh

Follow the prompts: The installer will prompt you to read and accept the license agreement and then type ‘yes‘.

Add Anaconda to PATH: It is recommended to accept the default path for ease of use else you can enter another path also

Now verify the installation using conda list command.

download and install miniconda ubuntu

Using Anaconda:~

  • Unlike Miniconda, Anaconda allows you to create and manage numerous Python environments.
  • To create a new environment, type the conda create --name jgnenv command, where “jgnenv” is the environment name.
  • To activate the newly created environment, type the conda activate jgnenv command.
  • Once the environment is active, you can install packages using the conda install package-name command, where the package name will be pandas, numpy, matplotlib, or any other python package. [source]
  • For example, install jupyter notebook anaconda ubuntu type conda install jupyter
  • To see all installed packages type conda list
  • To deactivate the environment, type the conda deactivate command.
  • To remove an environment, type the conda remove --name jgnenv --all command.

Step 4: How to remove uninstall anaconda ubuntu

In order to uninstall anaconda from your system, just remove the anaconda3 folder

rm -rf anaconda3
rm -rf ~/anaconda3
rm -rf ~/opt/anaconda3
uninstall anaconda ubuntu 22.04

Note: For deleting all env you can use the anaconda-clean package.

The Short Note:

In this tutorial, we have shown you how to install Anaconda on Ubuntu 22.04 LTS server or desktop, and also how to remove it if required. if you want to know How to run anaconda in ubuntu? – type ‘anaconda

Thanks 🙂

Related blog: Install Miniconda on Ubuntu Linux (desktop or server)

Tags:

Leave a Reply

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