How to Install Anaconda on a VPS

data science

Many people who work with Python have begun to notice the Anaconda project. It is a free and open source distribution of the Python and R languages. It is widely used in data science and machine learning. Therefore, large volumes of information can be processed for analysis quickly.

It is enough simple to install, run and update, in addition to being compatible with projects as important as Tensorflow. Well, in this tutorial, I will show you how you can create a cloud VPS instance to install Anaconda there ...

What is Anaconda Distribution?

Anaconda

Anaconda is nothing more than an open source suite, under BSD license, which contains a series of apps and libraries for the data science with programming languages ​​like Python. This distribution of the famous programming language works as an environment manager, package manager and has a huge repertoire of hundreds of packages.

Within Anaconda Distribution you can find four basic blocks:

  • Anaconda Navigator (GUI for its simple and intuitive management).
  • Anaconda Project.
  • Libraries for data science.
  • Conda (command for CLI management)

All of them will be installed automatically with the installation of the package, as I will show step by step later.

Anaconda Distribution Features

web servers

Anaconda Distribution has interesting features that make it so important in the world of data analysis. The most notable are:

  • It does not depend on any company, since it is maintained by the community and is open source, as well as free.
  • It is cross-platform, so it can work on both GNU / Linux, macOS and Windows.
  • It is very simple, being able to install and manage packages and environments for data science simply and quickly.
  • Many scientific projects use it, so it is completely reliable.
  • It's packed with useful tools to make your job easier, even for machine learning.
  • It is compatible with data viewers such as Matplotlib, Datashader, Bokeh, Holoviews, etc.
  • Advanced and very powerful management, with the possibility of accessing resources for advanced machine learning.
  • You will not have problems with package dependencies and version control.
  • Create and share documents with live compilation code, equations, descriptions, and annotations.
  • You can compile Python source code on any machine for fast execution. In addition, it will facilitate the writing of complex parallel algorithms.
  • Supports high performance computing.
  • Projects in Anaconda are portable, so they can be shared or deployed on other platforms.

What is a VPS?

how to choose web server

Although you can install Anaconda Distribution on a conventional PC, or your own server, in this tutorial we will show you how to do it in a VPS server, since it has a series of advantages, such as that it can be managed remotely by several users, greater bandwidth, scalability, high availability, and significant cost savings compared to the option of having your own server.

For a small subscription fee, you can have a service VPS (Virtual Private Server), that is, a virtual private server. In this case I will rely on Clouding for the tutorial. Therefore, it is fair to say that this VPS is basically a dedicated “parcel” exclusively for you of the data center of this provider. In it you can do whatever you want, such as installing a Linux server and a multitude of apps. In this case, we are going to install Anaconda.

This VPS will work as a standalone machineThat is, with its own RAM, with its storage space on fast SSDs, with a series of allocated CPU cores, as well as an operating system.

And you won't have to worry about managing your data center hardware, or paying energy or broadband fees for having a server, let alone necessary infrastructure costs...

Install Anaconda step by step

The chosen service, as I have commented, is Clouding.io, in which I will create an instance or VPS with GNU / Linux operating system from which install Anaconda in a simple way. That way, you can start with data science with the guarantees offered by this provider, since it has 24/7 support in Spanish in case something happens, and its data center is in Barcelona, ​​therefore, under protection laws European data. Thus avoiding the GAFAM / BATX, something almost vital in these times ...

Create Cl accountouding and prepare the VPS platform

Before we begin, the first thing is access the Clouding service. You can access it from its official website and choose the rate that best suits your needs. These rates differ in the amount of RAM, SSD storage, and CPU vCores that you will have at your disposal for your VPS. Even if you need more than what these rates offer, you have the option of configuring a custom server.

Being a scientific data analysis project, it would be interesting if you have the largest compute performance possible, as well as good amounts of RAM. Although if you are going to use it for more modest projects, it will not be necessary as much ...

Clouding rates

Once you have registered and followed the steps of the wizard, as well as verifying your email address, you will be able to access your panel. For that, you have to login in Clouding:

Cluding VPS registration

You are already in the service, and you will be seeing its intuitive control panel. If you want to start creating the instance or the VPS server, you have to click on Click here to create your first server:

Start VPS

This brings you to the configuration screen of your VPS server. The first thing you will see is the option to put the name you want to your VPS. Then the type of operating system you want to install. You can choose between Windows or Linux, and within the Linux section there are several available distros. In this case I have selected Ubuntu Server 20.04, but you can choose the one you prefer:

Anaconda VPS Distribution

Once done, go down on that same page and you will see other options to select the hardware resources: RAM capacity, SSD storage capacity, or the number of CPU cores you have to assign to your VPS. Keep in mind that you can manage them as you want, even if you want to create several VPS and distribute them among them ... And, remember, you can always scale with a higher plan, if you need it.

Hardware config

You also have options to configure the Firewall or for backups. In principle, it is not necessary that you touch that, although if you have any preference to improve security, go ahead. What is important is create and name the SSH key. Thanks to it, you can access remotely to manage your VPS without asking for your password every time.

Review that everything is OK and pulsa Eviar. That will take you to another screen where your VPS already appears. In status you will see that it is still installing and configuring itself. But don't worry, it is done very quickly:

Server status

In a few moments you will see that it has finished and the status field will appear as Assets. At that time, you can use your operating system to install what you need (in this case Anaconda).

Active VPS for Anaconda

Click on the name that you have put on your VPS and it redirects you to another page with a summary of the information of the server where you will install Anaconda:

Anaconda, VPS

Hence, what matters is the area called How to access the server. This is where the information you need for access is, the IP of the VPS, such as the password, the user (root) or the SSH key to download.

SSH data VPS connection

From all these data, with the Server IP, root and password you can now access remotely to proceed with the installation of Anaconda ...

Install Anaconda

Now everything is ready for the Anaconda installation on VPS. For that, you can visit Your Website to read more information about the project or check the latest version available.

To get started, you have to access your VPS server remotely via SSH. That way, from your local distro, you can install everything you need on the server. It will be as simple as opening your terminal and typing the following command (remember to replace youripdelserver with the IP of the VPS that you saw earlier in Clouding):

ssh root@tuipdelservidor

SSH connection

Is going to ask you the password, cut the one that Clouding showed you and paste. That will give you access. You will see that the prompt of your terminal has changed, it is no longer the local of your user, but now it is that of the remote machine. Therefore, all the commands you type from there will be executed on the VPS server.

connection SSH VPS Anaconda

Now that you have access, the next thing to do is to start download and install Anaconda with the following commands to bring it to the temporary directory and get the version available from the official repositories:

cd /tmp

curl -O https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux86_64.sh

Anaconda, download

After that, you will have Anaconda, the following is verify integrity of the downloaded data using the SHA-256 sum. For that, just run the following command:

sha256sum Anaconda3-2020.11-Linux-x86_64.sh

Y will return a hash to you check out.

Now you must start Anaconda with the following command:

bash Anaconda3-2020-11-Linux-x86_64.sh

Anaconda license

That will take you to a message asking you to press ENTER and in turn it will take you to the Ananconda license agreement. You can go to the end by pressing INTRO and it will ask you if you want to answer with a yes or a no. That is, if you accept the conditions or not. Type "yes" without quotes and press ENTER. The next thing you will see is:

installation and location

The next step is to select the installation location. Press ENTER for the path shown by default or enter a different path if you prefer ... Now the installation of Anaconda as such will begin. It will take a few moments.

When the process is completed, you will receive a message like the following one, indicating that it finished successfully:

continuing with the Anaconda installation

Type yes to start conda. Now it will return you to the prompt of your VPS. You have something else left before you can use conda, and that is to activate the installation with:

source ~/.bashrc

And now you can use conda and start giving Anaconda useful ... For example, you can see help on the options and list the available packages respectively with:

conda

conda list

commando conda

Even setting the environment for Anaconda to use python3, for example:

conda create --name mi_env python=3

Answer back y to the question you ask to proceed and the necessary will be installed.

conda active environment

You can activate the new environment to start working and enjoy ...

conda activate mi_env

Now that we have everything installed and working, you have been able to verify the power and versatility that a VPS hosting offers like the one we have shown you in Clouding. Anaconda is just one of the wide variety of applications and tools that you can install and use. Not everything comes down to creating websites. There are many more options that you can use a VPS for. If you have any questions, we leave a comment.


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.