Any environment can be customized with a unique version of Python and associated packages, which helps in avoiding unnecessary conflicts between versions within different projects or tasks.
Anaconda includes a conda package manager that allows you to install, update, and manage packages and their dependencies. It also allows you to create isolated environments for different projects, which helps avoid conflicts between libraries and versions.
For example, Anaconda is characterized by the following strengths:
Next, let's take a look at the installation process of the manager.
Select and download either Anaconda or Miniconda based on your needs. Miniconda is a lightweight version of Anaconda that installs only basic packages.
Launch Terminal using the Ctrl+Alt+T shortcut or find it in the applications menu.
Connect to your VPS with root privileges via SSH. After that you should update your system with APT:
sudo apt update
sudo apt upgrade
Navigate to the directory where the Anaconda installation file is located. If it is in the Downloads folder, run the command:
cd ~/Downloads
You need to run the installer script, resort to the command:
bash Anaconda3-2021.05-Linux-x86_64.sh
(Replace Anaconda3-2021.05-Linux-x86_64.sh with the name of your downloaded file).
Go through the installation process by following the on-screen instructions.
Once the installation is complete, execute Anaconda using the command:
source ~/.bashrc
The shell will now recognize Anaconda commands.
Verify that the installation was successful by running the command:
conda --version
You should see the installed version in front of you.
To work on more than one project at the same time, create a new environment using this command:
conda create --name myenv python=x.x
Replace myenv with the desired environment name and x.x with the desired Python version.
Download the packages you need using the conda command:
condainstallnumpy
When you are done working with the Anaconda environment, you can deactivate it:
condadeactivatemyenv
Uninstalling Anaconda from Ubuntu 22.04: Step-by-step instructions
The first thing you need to do is open the terminal, which is the main tool for interacting with your system via the command line. You can do this in a number of ways, either by pressing the keyboard shortcut Ctrl+Alt+T or by selecting Terminal from the applications menu of your desktop. Opening the terminal is an important step, as all further commands will be executed in this window.
Before proceeding with the uninstallation process, make sure that all Anaconda environments are deactivated. This will help avoid possible conflicts and errors during the uninstall process.
To do this, run the following command:
condadeactivate
This command will end the active sessions of any environments you may have previously started.
Now you can move on to the Anaconda uninstallation process itself. To do this, you will need to use the install script with the -uninstall option. You will need to navigate to the directory where Anaconda was installed and then run the following command:
bash ~/anaconda3/uninstall-Anaconda3.sh
This step will initiate the uninstall process and will start removing all Anaconda components from your computer.
Although the previous command should remove the main Anaconda components, some entries may still be present in shell configuration files such as .bashrc, .zshrc or .profile. These files contain environment settings and may store references to Anaconda.
To edit them, open the .bashrc file with a text editor such as Nano:
nano ~/.bashrc
In the editor that opens, look for lines related to Anaconda or Conda. Delete these lines to clear the file of unnecessary entries. After making your changes, remember to save the file and close the editor.
To completely delete all remaining Anaconda files, use the rm command. Keep in mind that this command starts irrevocably deleting all files and folders, so be careful:
rm -rf ~/anaconda3
If you installed Anaconda in a different directory, make sure you specify the correct directory path.
After completing all the above steps, it is important to verify that Anaconda has indeed been uninstalled from your computer. To do so, run the following command:
conda --version
If the system reports that the command was not found, it means that you have successfully uninstalled Anaconda and freed up space on your disk.
Anaconda is one of the widely recognized Python distributions that is uncomplicated to use and suitable for both beginners and advanced data experts. Despite its many benefits, it may sometimes be necessary to uninstall this platform.
Apply the discount by inserting the promo code in the special field at checkout: