Prerequisites:
To install Anaconda on Ubuntu, you need the following:
Conda is a popular choice for managing the Python packages because it offers several benefits, including the following:
To get Anaconda, download the installer from the Anaconda website. Open your computer browser and go to “https://www.anaconda.com/products/individual” to download Anaconda.
Scroll down until you reach the Linux section on the Anaconda individual edition page. Then, click on the “Download” button after selecting the required version of Anaconda for your machine.
After downloading, launch the Ubuntu terminal and go to the directory/folder that contains the Anaconda installation file.
Run the following command if the file is downloaded and stored in your system’s “Downloads” directory:
Then, use the following command to make the Anaconda installation file executable:
It should be noted that the version number may change based on the version that you downloaded. It might be beneficial if you change or use a different filename for the “Anaconda3-2023.09-0-Linux-x86_64.sh” installation file that you downloaded.
Now, execute the command to begin the Anaconda installation.
Replace the version number again with the exact filename of the installation file that you downloaded.
After performing the previously mentioned command, you will be prompted to accept the Anaconda license agreement. To proceed, type “yes” and press “Enter”.
After that, you will be requested to pick a location for installation. Since the default location is the most suitable option, press “Enter” to move forward.
After following these steps, Anaconda will be installed on your system.
To check the installation, run the following command:
This shows a list of every package and the Anaconda library installs by default.
As seen in the output, Anaconda is installed successfully.
Anaconda allows you to build the isolated environments in which the specified versions of libraries and packages can be installed. This is useful when working on numerous projects with various requirements. This command can be used to create a new environment:
Output:
Substitute your preferred environment name in place of “myenv”. Additionally, you can select the release of Python or any other programs that you want to include in this environment.
To make the environment active, execute the following command:
Output:
Now, in this environment, you can include any package or module.
Depending on the needs of your project, you might need to install the extra packages and libraries, even if Anaconda has many of them already included.
To install a specific package, replace with the package name. The version number and any additional dependencies that you wish to install alongside the package can also be specified.
Example:
Output:
Your Anaconda installation should always include the most recent packages and libraries. The command to update Anaconda is as follows:
All of the packages and libraries that come with Anaconda by default will be updated. Additionally, you can update specific packages by naming them.
Even though using Conda is an excellent way to manage the Python packages, pip, the built-in Python package manager, may occasionally be required for package installation. In the Anaconda environment, pip can also be used to install the packages:
Substitute “package_name” with the name of the package that you require. You can also specify the version number and any other dependencies that you intend to include with the package.
Example:
If your Anaconda environment contains many installed packages and libraries, you may wish to make a file to keep track of all the dependencies. You can make an environment file using the following command:
Output:
To permanently delete or uninstall Anaconda from the machine, run this command:
Your system will no longer have the Anaconda installation directory.
Conda, Anaconda, and Miniconda are all related to the Python package management.
In this post, we demonstrated how to install Conda on Ubuntu. Additionally, we discussed how to install the packages and libraries, configure the environments, update Anaconda, and remove Anaconda from your machine. You should be able to begin utilizing Anaconda for your data science, ML, and AI projects after reading this article.
You’ve recently installed VMware Workstation on your Ubuntu system and encountered the frustrating “Could not…
Have you ever found yourself staring at a terminal full of 404 errors while trying…
One particularly frustrating error that many users face when trying to upgrade from Ubuntu 18.04 …
In the world of containerization, time synchronization issues can create unexpected roadblocks when working with…
If you’ve recently upgraded to Ubuntu 23.04 or newer, you might have encountered a frustrating…
Canonical announces the General Availability of Ubuntu for the NVIDIA® Jetson Orin™ for edge AI…