Conda, the package manager from Anaconda, is now available as either a RedHat RPM or as a Debian package. The packages are the equivalent to the Miniconda installer which only contains Conda and its dependencies. You can use yum or apt-get to install, uninstall and manage Conda on your system. To install Conda follow the instructions for your Linux distribution. To install the RPM on RedHat, CentOS, Fedora distributions and other RPM-based distributions such as openSUSE, download the gpg key and add a repository configuration file for Conda:
# Import our gpg public key rpm --import https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc #Add the Anaconda repository cat <<EOF > /etc/yum.repos.d/conda.repo [conda] name=Conda baseurl=https://repo.anaconda.com/pkgs/misc/rpmrepo/conda enabled=1 gpgcheck=1 gpgkey=https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc EOF
Conda is ready for install on your RPM based distribution.
# Install it! yum install conda Loaded plugins: fastestmirror, ovl Setting up Install Process Loading mirror speeds from cached hostfile * base: repo1.dal.innoscale.net * extras: mirrordenver.fdcservers.net * updates: mirror.tzulo.com Resolving Dependencies --> Running transaction check ---> Package conda.x86_64 0:4.5.11-0 will be installed --> Finished Dependency Resolution Dependencies Resolved ==================================================================================== Package Arch Version Repository Size ==================================================================================== Installing: conda x86_64 4.5.11-0 conda 73 M Transaction Summary ==================================================================================== Install 1 Package(s) Total download size: 73 M Installed size: 210 M Is this ok [y/N]:
To install on Debian based Linux distributions such as Ubuntu, download the public gpg key and add the conda repository to the sources list.
<span> # Install our public gpg key to trusted store</span> <span>curl https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > conda.gpg</span> <span>install -o root -g root -m 644 conda.gpg /etc/apt/trusted.gpg.d/</span> <span># Add our debian repo</span> <span>echo "deb [arch=amd64] https://repo.anaconda.com/pkgs/misc/debrepo/conda</span> <span>stable main" > /etc/apt/sources.list.d/conda.list </span>
Conda is ready to install on your Debian based distribution.
<span> # Install it!</span> <span>apt-get update</span> <span>apt-get install conda</span> <span>Reading package lists... Done</span> <span>Building dependency tree</span> <span>Reading state information... Done</span> <span>The following NEW packages will be installed:</span> <span> conda</span> <span>0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.</span> <span>Need to get 76.3 MB of archives.</span> <span>After this operation, 221 MB of additional disk space will be used.</span> <span>Get:1 https://repo.anaconda.com/pkgs/misc/debrepo/conda stable/main amd64 conda amd64 4.5.11-0 [76.3 MB]</span> <span>Fetched 76.3 MB in 10s (7733 kB/s)</span> <span>debconf: delaying package configuration, since apt-utils is not installed</span> <span>Selecting previously unselected package conda.</span> <span>(Reading database ... 4799 files and directories currently installed.)</span> <span>Preparing to unpack .../conda_4.5.11-0_amd64.deb ...</span> <span>Unpacking conda (4.5.11-0) ...</span> <span>Setting up conda (4.5.11-0) … </span>
Check to see if the installation is successful by typing:
<span> source /opt/conda/etc/profile.d/conda.sh</span> <span>conda -V</span> <span>conda 4.5.11 </span>
Installing conda packages with the system package manager makes it very easy to distribute conda across a cluster of machines running Linux without having to worry about any non privileged user modifying the installation. Any non privileged user simply needs to run `source /opt/conda/etc/profile.d/conda.sh` to use conda.
Administrators can also distribute a .condarc file at /opt/conda/.condarc so that a predefined configuration for channels, package cache directory and environment locations is pre-seeded to all users in a large organization. A sample configuration could like:
<span> channels: - defaults pkg_dirs: - /shared/conda/pkgs - $HOME/.conda/pkgs envs_dirs: - /shared/conda/envs - $HOME/.conda/envs </span>
These rpm and debian packages provide another way to setup conda inside a docker container. It is recommended to use this installation in a read only manner and upgrade Conda using the respective package manager only.
If you’re new to Conda, check out the documentation at https://conda.io/docs/.
Talk to an Expert
Talk to one of our experts to find solutions for your AI journey.