Conda is an environment manager and a package manager that’s bundled into a single package. Environments are a desired way of having different versions of the same software on the same computer. They are necessary when different applications depend on different versions of a common dependency. An environment manager, such as Conda, creates different paths for each environment. An environment installs packages into and runs packages from only its path, which is different from the paths of other environments. Hence environments are independent of each other.
Conda distributes with Anaconda and Miniconda packages. In principle, Conda is not Python-specific, but it’s commonly used in Python-based applications. Anaconda includes Conda, a Python runtime environment, and many packages useful in data-science applications, such as PyTorch, Transformers, and Numpy. Anaconda saves a lot of time you would spend on installing packages. Hence, projects that require a variety of software tools prefer Anaconda because it’s uniquely suited to large projects and exploratory projects.
Unlike Anaconda, Miniconda only includes the most important utility packages that run on top of Conda and Python. It’s preferable on projects that require fewer tools and remote servers with storage limitations.
Choose Miniconda if:
This guide explains how to install and use Miniconda on a Vultr Ubuntu server.
Before you begin:
This guide uses the example values, user
pythonuserand the home directory/home/pythonuser/, replace all occurrences with your actual user account
Download the Miniconda installer script
$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
To get the latest installer script, visit the Miniconda downloads page
Two methods are available when installing Miniconda. The default normal installation option requires you to manually accept the license agreement and specify the installation directory. In the second silent installation option, the installer automatically accepts the license agreement and uses the default installation directory.
Depending on your preference, install Miniconda using any of the optional methods below.
$bash Miniconda3-latest-Linux-x86_64.sh When successful, the installer displays an on-screen message as below: In order to continue the installation process, please review the license agreement. Please, press ENTER to continueyes to proceed Do you accept the license terms? [yes|no] Miniconda3 will now be installed in this location: /home/dquser/miniconda3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location belowIf you don’t specify a location, Miniconda installs to the user’s home directory by default. For the user dquser, the default installation directory is /home/dquser/miniconda3yes to initialize Miniconda installation finished. Do you wish the installer to initialize Miniconda3 by running conda init? [yes|no]By default, the standard interactive way to install Miniconda involves a process of accepting options. Hence, the interactive method is not suitable for automatic installations using a script, and the batch mode solves this problem. The -b option runs the installer in batch mode and automatically accepts the license agreement to install Miniconda on your server, use the method as described in the following steps
$ bash Miniconda3-latest-Linux-x86_64.sh -bThe above command installs Miniconda to your user home directory. For the user pythonuser, it’s installed to /home/user/miniconda3To install Miniconda to a specific location, such as /var/miniconda, apply the -p option. For example: $ bash Miniconda3-latest-Linux-x86_64.sh -b -p /var/minicondaWhen the installation is complete, your output should look like the one below: Preparing transaction: done Executing transaction: done installation finished. $ source /home/pythonuser/miniconda3/bin/activateinit command to initialize Conda before using it $ conda init