Installing Anaconda on Ubuntu

Anaconda is a very popular distro of Python, which provides a convenient package Manager Conda, a few pre-installed versions of Python (2.7, 3.4 and 3.7) and the development environment IDLE Spider and many libraries that are easy to install. Yet there is a library to handle Big Data, predictive Analytics, and scientific computing. You can also manage everything via a graphical utility, Anaconda Navigator.

In this article, we’ll look at how to download and install Anaconda Python Ubuntu 18.04 from the official website of the program, and how to prepare the platform for operation.

Anacoda to install in Ubuntu

1. Download and install the program

First you need to download the installer platform from the official website. At the time of this writing, the latest version of the program – 2019.03. Click the Download button and then select Linux operating system:

You can download the program directly in the browser or copy the link to download via wget. For example, for the current version of the command will look like this:

wget https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh

Since it is quite a large file, after the download is complete it is advisable to check it on control points. To find the checksum of the downloaded file with the command:

sha256sum Anaconda3-2019.03-Linux-x86_64.sh

Then, it must compare with total shown on this page are for your version of the program. If the resulting values match, then all right.

Next, run the script:

bash Anaconda3-2019.03-Linux-x86_64.sh

In the first step of the installation press Enter, then type yes to accept the license agreement:

Next you need to select the folder where you installed the program:

Then go to install Anaconda 3 Ubuntu. The installation process will take some time.

At the end of installation the program will offer to change ~/.bashrc so that Сonda start automatically when you start terminal. If you haven’t done this during installation, it can be done then the command:

conda init bash

Then run the following command to read settings:

source ~/.bashrc

Now you can check if everything works by running the following command:

conda info

The Anaconda installation of Ubuntu completed.

2. Update Anaconda

Update Anaconda is also quite simple to perform. You must first update the conda tool. To do this, run:

conda update conda

On programme questions, answer y. When the update has completed, you can upgrade the Anaconda 3:

conda update anaconda

Like the previous item, press yto continue the update.

3. Environment Conda

As I said, Сonda is a package Manager, and this Manager environments. You can create multiple environments with different Python versions, and with different installed libraries. View the list of available environments with the command:

conda info --envs

To activate the environment, use the command activate. For example, do active environment base:

conda activate base

You can also create a new environment with a different version of Python. For example do environment with Python 3.5:

conda create --name ptn35env python=3.5

The program will create the environment and let you know which packages it is necessary to install, accept the installation:

Then activate the desired environment:

conda activate ptn35env

To deactivate the current environment, use the deactivate command:

conda deactivate

To remove the environment ptn35env, you need to use the uninstall command and remove:

conda remove --name ptn35env -all

4. Install the packages Conda

View the list of installed packages with the list command:

conda list

To find the desired package, use search, for example, looking for package Manager Python – pip:

comda search pip

And to install a package use install. For example, set tensorflow:

conda install tensorflow

Remove the package with the command remove:

conda remove tensorflow

Removing Anaconda

To remove the Anaconda from his system, enough to run the following commands:

rm-rf ~/anaconda3

Open the file ~/.bashrc and delete out the lines added Anaconda usually are between tags conda initialize:

Then delete the hidden folders with additional files and configuration platforms:

rm-rf ~/.condarc ~/.conda ~/.continuum

Insights

Now install Anaconda on Ubuntu completed. You can start using the package Manager Conda, use of virtual environments in Python and easy to install packages. We discussed only the basics of using conda to study better, read the official documentation.

Source: losst.ru

(Visited 116 times, 1 visits today)