Why Use Anaconda?
Anaconda comes with Conda, a powerful package and environment manager that simplifies the installation and management of software packages. With Anaconda, you can easily create and manage isolated environments, ensuring that your projects have the right dependencies. Anaconda includes pre-installed packages like PyTorch, Transformers, NumPy, SciPy, and many more, making it an ideal choice for servers with limited storage.
Prerequisites
Before getting started, ensure you have:
- A server running Ubuntu 22.04.
- A user account with administrative privileges.
Step 1: Update Your Server
Start by updating your server to ensure all packages are up to date. Run the following command:
sudo apt update
Step 2: Download the Anaconda Installer Script
Next, download the Anaconda installer script from the official Anaconda website. Use the command below to download the script:
curl -O https://repo.anaconda.com/archive/Anaconda3-2023.07-2-Linux-x86_64.sh
Step 3: Install Anaconda on Ubuntu
To install Anaconda silently and quickly, use the following command:
bash Anaconda3-2023.07-2-Linux-x86_64.sh -b
Example output:
PREFIX=/home/admin/anaconda3
Unpacking payload ...
Installing base environment...
Downloading and Extracting Packages
Preparing transaction: done
Executing transaction: -
Installed package of scikit-learn can be accelerated using scikit-learn-intelex.
More details are available here: https://intel.github.io/scikit-learn-intelex
Installation finished.
Step 4: Initialize Conda
Activate the Anaconda environment and initialize Conda:
source /home/admin/anaconda3/bin/activate
conda init
Step 5: Verify the Installation
Check the installed version of Conda:
conda -V
To view the list of installed programs:
conda list
Conclusion
Congratulations! You’ve successfully installed Anaconda on your Ubuntu 22.04 server. Now you can manage packages and environments effectively for your data science and machine learning projects.