Install anaconda python on linux

How To Install Anaconda on Ubuntu 18.04 [Quickstart]

Designed for data science and machine learning workflows, Anaconda is an open-source package manager, environment manager, and distribution of the Python and R programming languages.

This tutorial will guide you through installing Anaconda on an Ubuntu 18.04 server. For a more detailed version of this tutorial, with better explanations of each step, please refer to How To Install the Anaconda Python Distribution on Ubuntu 18.04.

Step 1 — Retrieving the Latest Version of Anaconda

From a web browser, go to the Anaconda Distribution page, available via the following link:

https://www.anaconda.com/distribution/ 

Find the latest Linux version and copy the link to the installer bash script.

Step 2 — Downloading the Anaconda Bash Script

Logged into your Ubuntu 18.04 server as a sudo non-root user, move into the /tmp directory and use curl to download the link you copied from the Anaconda website:

Step 3 — Running the Anaconda Script

You’ll receive the following output to review the license agreement by pressing ENTER until you reach the end.

Output
Welcome to Anaconda3 2021.05 In order to continue the installation process, please review the license agreement. Please, press ENTER to continue >>> . Do you approve the license terms? [yes|no]

When you get to the end of the license, type yes then press ENTER as long as you agree to the license to complete installation.

Step 4 — Completing the Installation Process

Once you agree to the license, you will be prompted to choose the location of the installation. You can press ENTER to accept the default location, or specify a different location.

Output
Anaconda3 will now be installed into this location: /home/sammy/anaconda3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location below [/home/sammy/anaconda3] >>>

At this point, the installation will proceed. Note that the installation process takes some time.

Step 5 — Selecting Options

Once installation is complete, you’ll receive the following output:

Output
. installation finished. Do you wish the installer to initialize Anaconda3 by running conda init? [yes|no] [no] >>>

It is recommended that you type yes to use the conda command.

Step 6 — Activating Installation

You can now activate the installation with the following command:

Читайте также:  Linux see opened ports

Step 7 — Testing Installation

Use the conda command to test the installation and activation:

You’ll receive output of all the packages you have available through the Anaconda installation.

Step 8 — Setting Up Anaconda Environments

You can create Anaconda environments with the conda create command. For example, a Python 3 environment named my_env can be created with the following command:

Activate the new environment like so:

Your command prompt prefix will change to reflect that you are in an active Anaconda environment, and you are now ready to begin work on a project.

Here are links to more detailed tutorials that are related to this guide:

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Still looking for an answer?

This textbox defaults to using Markdown to format your answer. You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

thank you Lisa for the detailed steps! one suggestion for step 2: it’s better to use wget -c instead of curl over unstable internet connection!

By mistake in step 6 I entered no, installation is done, but when I use condo command it says command not found. Is there any way to resolve this

At the end, if you have problems (conda command not found) or something like that, remember just add conda’s location to your path.

Clear, efficient and no problems while following those instructions. enough explications without unnecessary blabla. Thanks a lot

Guys help, please. I successfully installed anaconda (on Ubuntu 18.04), although I didn’t say yes when it asked to be added to path. But I did that manually by editing my bashrc file.

The problem now is when I create an environment and activate it, Conda doesn’t append it to my terminal prompt.
I only know it’s active by doing conda info 🙂

I created a test_env as such:

conda create -n test_env python=3 

Here is the output of conda info:

 active environment : test_env active env location : /home/stealthman22/anaconda3/envs/test_env shell level : 2 user config file : /home/stealthman22/.condarc populated config files : conda version : 4.8.3 conda-build version : 3.18.11 python version : 3.8.3.final.0 virtual packages : __glibc=2.27 base environment : /home/stealthman22/anaconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /home/stealthman22/anaconda3/pkgs /home/stealthman22/.conda/pkgs envs directories : /home/stealthman22/anaconda3/envs /home/stealthman22/.conda/envs platform : linux-64 user-agent : conda/4.8.3 requests/2.24.0 CPython/3.8.3 Linux/5.0.0-32-generic linuxmint/19.3 glibc/2.27 UID:GID : 1000:1000 netrc file : None offline mode : False 

Hi Lisa, I use Ubuntu 16.04 LTS and after I installed Anaconda the name “(base)” is appearing before my computer’s name in the terminal. Is there a way to take it off without messing with anaconda installation and its packages? Thanks!

Читайте также:  Routing in linux commands

Источник

Installing on Linux#

Using Anaconda in a commercial setting? You may need to purchase a license to stay compliant with our Terms of Service. This can be accomplished through several of Anaconda’s tiers: Pro , Business (On-prem), Business (Cloud) , or Enterprise. If you have already subscribed to the Pro or Business tiers, see the quickstart guides for Pro or Business to get started!

Visit https://anaconda.cloud/pricing to compare tier capabilities and pricing.

Prerequisites#

To use GUI packages with Linux, you will need to install the following extended dependencies for Qt:

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

yum install libXcomposite libXcursor libXi libXtst libXrandr alsa-lib mesa-libEGL libXdamage mesa-libGL libXScrnSaver

pacman -Sy libxau libxi libxss libxtst libxcursor libxcomposite libxdamage libxfixes libxrandr libxrender mesa-libgl alsa-lib libglvnd

zypper install libXcomposite1 libXi6 libXext6 libXau6 libX11-6 libXrandr2 libXrender1 libXss1 libXtst6 libXdamage1 libXcursor1 libxcb1 libasound2 libX11-xcb1 Mesa-libGL1 Mesa-libEGL1

emerge x11-libs/libXau x11-libs/libxcb x11-libs/libX11 x11-libs/libXext x11-libs/libXfixes x11-libs/libXrender x11-libs/libXi x11-libs/libXcomposite x11-libs/libXrandr x11-libs/libXcursor x11-libs/libXdamage x11-libs/libXScrnSaver x11-libs/libXtst media-libs/alsa-lib media-libs/mesa

Installation#

  1. In your browser, download the Anaconda installer for Linux.
  2. Search for “terminal” in your applications and click to open.
  3. (Recommended) Verify the installer’s data integrity with SHA-256 . For more information on hash verification, see cryptographic hash validation.
  4. In the terminal, run the following:
shasum -a 256 /PATH/FILENAME # Replace /PATH/FILENAME with your installation's path and filename. 
# Include the bash command regardless of whether or not you are using the Bash shell bash ~/Downloads/Anaconda3-2020.05-Linux-x86_64.sh # Replace ~/Downloads with your actual path # Replace the .sh file name with the name of the file you downloaded 
# Include the bash command regardless of whether or not you are using the Bash shell bash ~/Downloads/Anaconda2-2019.10-MacOSX-x86_64.sh # Replace ~/Downloads with your actual path # Replace the .sh file name with the name of the file you downloaded 

Note Anaconda recommends you accept the default install location. Do not choose the path as /usr for the Anaconda/Miniconda installation.

# Replace with the path to your conda install source /bin/activate conda init
# The base environment is activated by default conda config --set auto_activate_base True # The base environment is not activated by default conda config --set auto_activate_base False # The above commands only work if conda init has been run first # conda init is available in conda versions 4.6.12 and later 

Note If you install multiple versions of Anaconda, the system defaults to the most current version, as long as you haven’t altered the default install path.

Problems?#

What’s next?#

Get started programming quickly with Anaconda in the Getting started with Anaconda guide.

Installing on AWS Graviton2 (arm64)

Источник

Installation#

Review the system requirements listed below before installing Anaconda Distribution. If you don’t want the hundreds of packages included with Anaconda, install Miniconda, a mini version of Anaconda that includes just conda, its dependencies, and Python.

Looking for Python 3.5 or 3.6? See our FAQ .

System requirements

  • License: Free use and redistribution under the terms of the EULA for Anaconda Distribution.
  • Operating system: Windows 10 or newer, 64-bit macOS 10.13+, or Linux, including Ubuntu, RedHat, CentOS 7+, and others.
  • If your operating system is older than what is currently supported, you can find older versions of the Anaconda installers in our archive that might work for you. See Using Anaconda on older operating systems for version recommendations.
  • System architecture: Windows- 64-bit x86; MacOS- 64-bit x86 & M1; Linux- 64-bit x86, 64-bit aarch64 (AWS Graviton2), 64-bit Power8/Power9, s390x (Linux on IBM Z & LinuxONE).
  • Minimum 5 GB disk space to download and install.

On Windows, macOS, and Linux, it is best to install Anaconda for the local user, which does not require administrator permissions and is the most robust type of installation. However, with administrator permissions, you can install Anaconda system wide.

  • Installing on Windows
  • Installing on macOS
  • Installing on Linux
  • Installing on AWS Graviton2 (arm64)
  • Installing on Linux-s390x (IBM Z)
  • Installing on Linux POWER
  • Installing in silent mode
  • Installing for multiple users
  • Verifying your installation
  • Updating from older versions
  • Installing previous versions of Anaconda Distribution
  • Using Anaconda on older operating systems
  • Uninstalling Anaconda Distribution

Silent mode install

Use silent mode to automatically accept default settings and have no screen prompts appear during installation.

Need to use Anaconda on an older operating system?

Installing Anaconda on a non-networked machine (air gap)

  1. Obtain a local copy of the appropriate Anaconda installer for the non-networked machine. You can copy the Anaconda installer to the target machine using many different methods, including a portable hard drive, USB drive, or CD.
  2. After copying the installer to the non-networked machine, follow the detailed installation instructions for your operating system.

Install offline copies of both docs.anaconda.com and enterprise-docs.anaconda.com by installing the conda package anaconda-docs: conda install anaconda-docs

Install offline copies of documentation for many of Anaconda’s open-source packages by installing the conda package anaconda-oss-docs: conda install anaconda-oss-docs

Other ways to get Anaconda or Miniconda

The official Anaconda or Miniconda AMIs are on the AWS Marketplace.

If you have a CDH (Cloudera Distributed Hadoop) cluster, install the Anaconda parcel using Cloudera Manager. The Anaconda parcel provides a static installation of Anaconda, based on Python 2.7, that can be used with Python and PySpark jobs on the cluster.

Troubleshooting

If you experience errors during the installation process, review our Troubleshooting topics .

Источник

Оцените статью
Adblock
detector