DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. How to Install Anaconda on ECS

How to Install Anaconda on ECS

In this tutorial, we will be installing and setting up Anaconda Python on an Alibaba Cloud Elastic Compute Service (ECS) instance with Ubuntu 16.04 installed.

Arslan ud Din Shafiq user avatar by
Arslan ud Din Shafiq
CORE ·
Oct. 02, 19 · Tutorial
Like (5)
Save
Tweet
Share
7.18K Views

Join the DZone community and get the full member experience.

Join For Free

Anaconda is an open source and free distribution of Python and R programming languages used for data science and machine learning related applications. Anaconda helps organizations to develop, manage, and automate AI/ML, regardless of the scale of deployment. It allows organizations to scale from individual data scientists to a collaborative group of data scientists, and from a single server to thousands of nodes for model training and deployment.

In this tutorial, we will be installing and setting up Anaconda Python on an Alibaba Cloud Elastic Compute Service (ECS) instance with Ubuntu 16.04 installed.

Prerequisites

  • You must have Alibaba Cloud Elastic Compute Service (ECS) activated and verified your valid payment method. Your ECS instance must have at least 1GB RAM and 1 Core processor.
  • At least 3GB free disk space is required for installing Anaconda Python.
  • A domain name registered from Alibaba Cloud. If you have already registered a domain from Alibaba Cloud or any other host, you can update its domain nameserver records.
  • Domain name must be pointed to your Alibaba Cloud ECS's IP address.
  • Access to VNC console in your Alibaba Cloud or SSH client installed in your PC.
  • Set up your server's hostname and create user with root privileges.

Setting Up Your Server

Before proceeding with the installation of any kind of package, use the following command to update your Ubuntu system. To execute this command, remember to login from non-root user with sudo privileges. Security is hard to determine, however, you would like to use VPN for security enhancement.

# sudo apt update && sudo apt upgrade

One of the best QR code generator to use is QRzebra easy and professional to use to make dynamic QR Codes with logo.

Download and Install Anaconda Python

To download and install Anaconda Python, you are recommended to use Anaconda installer bash script. The bash script will automatically install the required libraries and packages. To do this, you will need to follow the steps below.

Navigate to the /tmp directory, because after installation of Anaconda Python, you will no longer require the Anaconda installer bash script, so you may delete it.

# cd /tmp

To fetch latest version of Anaconda Python installer, you may check official website of Anaconda Python https://www.anaconda.com/download/#linux. Execute the following command to fetch Anaconda Python installer bash script.

# curl -O https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh

Execute the following command to check whether the file has been downloaded successfully. Also note the name of the file because it will be used for checksum in the next step.

# ls -li

1

You will need to verify the data integrity of the installation. To do so, you will have to use cryptographic hash verification through SHA-256 checksum. To do this, you will have to execute sha256sum command and use the Anaconda3-5.2.0-Linux-x86_64.sh file name. In your case, the file name may be different due t to the different versions of Anaconda Python.

# sha256sum Anaconda3-5.2.0-Linux-x86_64.sh

You will see the following output:

09f53738b0cd3bb96f5b1bac488e5528df9906be2480fe61df40e0e0d19e3d48  Anaconda3-5.2.0-Linux-x86_64.sh

You can check the out by comparing hashes available at Anaconda Python page. http://docs.continuum.io/anaconda/install/hashes/

You will need to run the following bash script.

# bash Anaconda3-5.2.0-Linux-x86_64.sh

You will be prompted to review the license agreement. Press Enter to continue.

Keep hitting Enter until you see "Please answer 'yes' or 'no'." Type 'yes' and hit Enter.

You will be prompted to confirm installation location. Hit Enter.

You will be prompted to confirm prepend install location to PATH. Type 'yes' and hit Enter.

You will see the following screen. You will be asked to install Microsoft Visual Studio. Type 'yes' and hit Enter to continue.

The installation of Anaconda Python has been completed. In order to activate installation, you will need to source the file using the command below.

# source ~/.bashrc

You can verify the installation by executing the following command.

# conda list

Using for your QR codes a dynamic QR Code generator allows you to track data and edit your content, witch is great if you are a marketer.

Setting Up Anaconda Environments

You can keep projects in Anaconda virtual environments by organizing them on the basis of Python versions and packages. You can specify the version of Python for each Anaconda environment and keep all the related programming files together within that directory. You can check the available versions of Python by executing the command below.

# conda search "^python$"

You will need to create an environment. You can do so by using most recent version of Python 3. You can achieve this by assigning version 3 to Python. To assign version, execute the following command.

# conda create --name aareez python=3

Remember to replace aareez with your desired environment name.

If you want to target a specific version, you may use command by specifying version number as given below.

# conda create --name aareez python=3.7.0

After execution of the above command, you will see the following message where you will be asked for permission to install new packages. Simply type 'y' and hit Enter to proceed.

After successful creation of environment and installation of required packages, you will see a screen suggesting you the command to activate or deactivate created environment.

Each environment on creation installs some required default packages including:

  1. zlib
  2. xz
  3. tk
  4. wheel
  5. setuptools
  6. sqlite
  7. python
  8. readline
  9. openssl
  10. pip

You can also add additional packages if required. For example, if you want to install numpy, you will need to install the following command.

# conda install --name aareez numpy

You will see the following screen which asks you to permit installation of required packages. Type 'y' and hit Enter.

You can activate environment by executing the command below.

# source activate aareez

If you want to install r-acepack in your current environment, you can execute the following command to install r-acepack after activating your environment.

# conda install -c r r-acepack

You will see the following screen which asks you to permit installation of required packages. Type 'y' and hit Enter.

You may deactivate environment using the command below.

# source deactivate

You can verify the version of Python within the environment by using the command below.

# python --version

You can also update the version of conda by executing the command below within the environment.

# conda update python

You can also check the available environments by executing the command below. After executing the command, you will see the list of environments.

# conda info --envs

2

The asterisk (*) indicates the currently activated environment.

If you are willing to install any package during the creation of the environment, you may use the following command for the creation of environment.

# conda create --name aareez python=3 numpy

When you are done working in an environment and no longer require the particular environment to work, you may remove this using the following command.

# conda remove --name aareez ¨Call

You will see the following screen in which you are asked to allow to remove the other installed packages. Type 'y' and hit Enter, environment named aareez will be deleted successfully.

To verify, you can again check the list of available environments by using the following command.

# conda info --envs

3

Update Anaconda

It is necessary to keep your Anaconda up to date to get the latest packages. To do so, you can execute the command below.

# conda update conda

You will be asked for permission to allow updating packages. Type 'y' and hit Enter.

After this execute the following command to update Anaconda.

# conda update Anaconda

This will ensure the use of latest version of Anaconda.

You will be asked for permission to allow updating packages. Type 'y' and hit Enter.

Congratulations! You have successfully installed Anaconda Python on an Alibaba Cloud Elastic Compute Service (ECS) instance.

Anaconda (installer) Entity component system Command (computing) Python (language) Cloud computing Alibaba Cloud Data science

Published at DZone with permission of Arslan ud Din Shafiq, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How To Select Multiple Checkboxes in Selenium WebDriver Using Java
  • 19 Most Common OpenSSL Commands for 2023
  • Integrate AWS Secrets Manager in Spring Boot Application
  • Distributed Tracing: A Full Guide

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: