Installing Anaconda Python on an ECS instance

In this tutorial, you will install and configure ** Anaconda ** on Alibaba Cloud Elastic Compute Service (** ECS **) with Ubuntu 16.04 installed.

Prerequisites

--You need to enable Alibaba Cloud Elastic Compute Service (ECS) to see the valid payment methods. If you are a new user, you can earn Alibaba Cloud credits $ 300- $ 1200 worth for your new account. If you don't know how to set up an ECS instance, click here (https://www.alibabacloud.com/blog/3-ways-to-set-up-a-linux-server-on-alibaba-cloud_572384?spm= See the tutorial on a2c65.11461447.0.0.3eca2221jemyAq) or the Quick Start Guide (https://www.alibabacloud.com/help/en/doc-detail/25422.htm). The ECS instance must have at least 1GB of RAM and a 1-core processor. --At least 3GB of free disk space is required to install Anaconda Python. --Domain name registered from Alibaba Cloud. If you have already registered your domain from Alibaba Cloud or another host, you can update the record for that Domain Name (https://www.alibabacloud.com/en/domain) server. --The domain name must point to your Alibaba Cloud ECS IP address. -Access the SSH client installed on Alibaba Cloud's VNC console or PC. --Set the host name of the server and create a user with root privileges.

Server settings

Please update your Ubuntu system with the following command before proceeding with the package installation. Remember to log in with sudo privileges as a non-root user to run this command.

# sudo apt update && sudo apt upgrade

Download and install Anaconda Python

We recommend using the Anaconda installer bash script to download and install Anaconda Python. The bash script will automatically install the required libraries and packages for you. To do this, you need to follow the steps below.

After installing Anaconda Python, you no longer need the Anaconda installer bash script, so change to the directory ** / tmp **.

# cd /tmp

To get the latest version of the Anaconda Python installer, go to the official Anaconda Python website [https://www.anaconda.com/download/#linux](https://www.anaconda.com/download?spm=a2c65. See 11461447.0.0.3eca2221YWFOAp # linux.). Run the following command to get the bash script for the Anaconda Python installer.

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

Run the following command to see if the file was downloaded successfully. Also, make a note of the file name for use in the checksum in the next step.

# ls -li

image.png

You need to verify the integrity of the installation data. To do this, you must use SHA-256 checksum cryptographic hash validation. To do this, you need to run the ** sha256sum ** command and use the ** Anaconda3-5.2.0-Linux-x86_64.sh ** filename. In your case, the file name may be different due to different versions of Anaconda Python.

# sha256sum Anaconda3-5.2.0-Linux-x86_64.sh

You should see output similar to the following.

09f53738b0cd3bb96f5b1bac488e5528df9906be2480fe61df40e0e0d19e3d48  Anaconda3-5.2.0-Linux-x86_64.sh

You can see the outs by comparing the available hashes on the Anaconda Python page. http://docs.continuum.io/anaconda/install/hashes/

You need to run a bash script.

# bash Anaconda3-5.2.0-Linux-x86_64.sh

You will be asked to confirm the license agreement. Press ** Enter ** to continue.

Press and hold ** Enter ** until you see ** Please answer'yes' or'no' **. Type ** yes ** and press ** Enter **.

You will be prompted to confirm the installation location. Press ** Enter **.

You will be prompted to confirm that you want to prepend the installation to your PATH. Type ** yes ** and press ** Enter **.

The following screen will be displayed. You will be prompted to install Microsoft Visual Studio. Type ** yes ** and press ** Enter ** to continue.

This completes the installation of Anaconda Python. To enable the installation, you need to source the files with the following command.

# source ~/.bashrc

You can confirm the installation by executing the following command.

# conda list

Anaconda environment settings

You can keep projects in Anaconda virtual environment by organizing projects in Anaconda virtual environment by Python version and package. You can specify a Python version for each Anaconda environment and keep related programming files in that directory. You can check the available Python version by running the following command.

# conda search "^python$"

You need to create an environment. This can be achieved by using the latest version of Python 3. This can be achieved by assigning version 3 to Python. To assign a version, run the following command:

# conda create --name aareez python=3

Don't forget to replace ** aareez ** with the desired environment name.

If you want to target a specific version, you can use the command by specifying the version number as shown below.

# conda create --name aareez python=3.7.0

When I run the above command, I get a message similar to the following, asking for permission to install the new package. Type ** y ** and press ** Enter **.

After creating the environment and installing the required packages, you will see a screen with commands to enable or disable the created environment.

The following required default packages are installed in each created environment.

1、zlib 2、xz 3、tk 4、wheel 5、setuptools 6、sqlite 7、python 8、readline 9、openssl 10、pip You can also add packages as needed. For example, if you want to install numpy, you need to install the following command.

# conda install --name aareez numpy

The following screen will appear asking if you want to allow the installation of the required packages. Type ** y ** and press ** Enter **.

You can enable the environment by executing the following command.

# source activate aareez

If you want to install ** r-acepack ** in your current environment, you can install it after starting the environment by executing the following command.

# conda install -c r r-acepack

The following screen will appear asking if you want to allow the installation of the required packages. Type ** y ** and press ** Enter **.

You can disable the environment with the following command.

# source deactivate

You can check the Python version in your environment with the following command.

# python --version

You can also update the version of conda by executing the following command in the environment.

# conda update python

You can also check the available environment by executing the following command. When you run the command, a list of environments will be displayed.

# conda info --envs

image.png

An asterisk (*) indicates the environment that is currently running.

If you want to install any package while creating the environment, you can use the following command to create the environment.

# conda create --name aareez python=3 numpy

When you are finished working in one environment and no longer need to work in a particular environment, you can delete it using the following command:

# conda remove --name aareez ¨Call

A screen similar to the one below will be displayed, asking if you want to allow the removal of other installed packages. Type ** y ** and press ** Enter ** to successfully remove the environment named ** aareez **.

To check, you can check the list of available environments again with the following command.

# conda info --envs

image.png

Anaconda update

You need to keep Anaconda up to date in order to get the latest packages. To do this, run the following command.

# conda update conda

You will be asked if you want to allow the package update. Type ** y ** and press ** Enter **.

Then run the following command to update Anaconda.

# conda update Anaconda

This will ensure that you are using the latest version of Anaconda.

You will be asked for permission to allow the package update. Type ** y ** and press ** Enter **.

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

Recommended Posts

Installing Anaconda Python on an ECS instance
Installing pandas on python2.6
Notes on installing Python on Mac
Notes on installing Anaconda 3 on Windows
Notes on installing Python on CentOS
Installing Kivy on Windows10 64bit Python3.5
Anaconda python environment construction on Windows 10
Support when installing pillow on python3.9
Installing Kivy-Designer on Windows10 64bit Python3.5
Notes on installing Python using PyEnv
Python import directory order (on anaconda)
Installing Python 3.4.3.
The road to installing Python and Flask on an offline PC
[Python] Building an environment with Anaconda [Mac]
The result of installing python in Anaconda
Use without installing python 2.x on Windows
Build Python environment with Anaconda on Mac
Create an OpenCV3 + python3 environment on OSX
Install Odoo on Alibaba Cloud ECS instance
Installing PIL with Python 3.x on macOS
Python 3.3 in Anaconda
[Python] class, instance
How to build an environment when you want to use python2.7 after installing Anaconda3
Notes from installing Homebrew to building an Anaconda environment for Python with pyenv
Build Python3.5 + matplotlib environment on Ubuntu 12 using Anaconda
Python on Windows
twitter on python3
Notes on installing Python3 and using pip on Windows7
Building an Anaconda environment for Python with pyenv
Theano on Anaconda
python on mac
I got stuck installing Anaconda 4.3.0 which became Python 3.6
[Node-RED] Execute Python on Anaconda virtual environment from Node-RED [Anaconda] [Python]
pyenv + anaconda + python3
Python is instance
Python class, instance
Python on Windbg
[Python] How to install OpenCV on Anaconda [Windows]
[Note] Installing Python 3.6 + α on Windows and RHEL
Installing TensorFlow on Windows Easy for Python beginners
Try running a Schedule to start and stop an instance on AWS Lambda (Python)
# 2 Build a Python environment on AWS EC2 instance (ubuntu18.04)
Create a comfortable Python 3 (Anaconda) development environment on windows
From python to running instance on google cloud platform
Installing Python 3 on Mac and checking basic operation Part 1
How to deploy a Go application to an ECS instance
Install django on python + anaconda and start the server
python (2) requires self because the method is an instance method
Python conda on cygwin
Install python on WSL
PyOpenGL setup on Python 3
Install Python on Pidora.
Install Scrapy on python3
Install Python on Mac
Install Python 3 on Mac
Install Python3.4 on CentOS 6.6
Notes on installing PycURL
Use Python 3.8 with Anaconda
Anaconda on Windows Terminal
Install Anaconda on Windows 10
python basic on windows ②