Installing on Linux#
Using Anaconda in a commercial setting?
You might need to purchase a license to a paid tier to stay compliant with our Terms of Service. Visit our pricing page to compare tier capabilities and pricing.
Prerequisites#
The anaconda-navigator
package is installed by default with Anaconda Distribution and includes the dependency package qt
. All of the dependencies for qt
should also be installed by default, but installing the following extended dependencies might be required for certain versions of Anaconda Distribution in order to use GUI (Graphical User Interface) packages with Linux:
apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
yum install libXcomposite libXcursor libXi libXtst libXrandr alsa-lib mesa-libEGL libXdamage mesa-libGL libXScrnSaver
pacman -Sy libxau libxi libxss libxtst libxcursor libxcomposite libxdamage libxfixes libxrandr libxrender mesa-libgl alsa-lib libglvnd
zypper install libXcomposite1 libXi6 libXext6 libXau6 libX11-6 libXrandr2 libXrender1 libXss1 libXtst6 libXdamage1 libXcursor1 libxcb1 libasound2 libX11-xcb1 Mesa-libGL1 Mesa-libEGL1
emerge x11-libs/libXau x11-libs/libxcb x11-libs/libX11 x11-libs/libXext x11-libs/libXfixes x11-libs/libXrender x11-libs/libXi x11-libs/libXcomposite x11-libs/libXrandr x11-libs/libXcursor x11-libs/libXdamage x11-libs/libXScrnSaver x11-libs/libXtst media-libs/alsa-lib media-libs/mesa
Installation#
To download the installer, open a terminal and use the following command, depending on your Linux architecture:
# Replace <INSTALLER_VERSION> with the version of the installer file you want to download # For example, https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-x86_64.sh # All installers can be found at repo.anaconda.com/archive/ curl -O https://repo.anaconda.com/archive/Anaconda3-<INSTALLER_VERSION>-Linux-x86_64.sh
# Replace <INSTALLER_VERSION> with the version of the installer file you want to download # For example, https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-aarch64.sh # All installers can be found at repo.anaconda.com/archive/ curl -O https://repo.anaconda.com/archive/Anaconda3-<INSTALLER_VERSION>-Linux-aarch64.sh
# Replace <INSTALLER_VERSION> with the version of the installer file you want to download # For example, https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-s390x.sh # All installers can be found at repo.anaconda.com/archive/ curl -O https://repo.anaconda.com/archive/Anaconda3-<INSTALLER_VERSION>-Linux-s390x.sh
View a full list of Anaconda Distribution installers at repo.anaconda.com/archive/. The latest installer versions are always at the top of the list.
(Optional) Anaconda recommends verifying the integrity of the installer after downloading it.
How do I verify my installer’s integrity?
You can verify your installer’s data integrity with the SHA-256 hash that matches your chosen installer. See the hash index for a list of installers and their hashes. For more information on hash verification, see cryptographic hash verification in the official conda documentation.
To check the integrity of the installer, run the following command:
# If downloaded via the browser, this should be in the Downloads folder # If downloaded using the curl command, this will be the current directory shasum -a 256 /PATH/TO/INSTALLER-FILENAME
For example:
shasum -a 256 Downloads/Anaconda3-2023.09-0-Linux-x86_64.sh
To install, run the following command, depending on your Linux architecture:
# Include the bash command even if you aren't using the Bash shell # Replace ~/Downloads with the path to the installer file, if necessary # Replace <INSTALLER_VERSION> with the version of the installer file # For example, Anaconda3-2023.09-0-Linux-x86_64.sh bash ~/Downloads/Anaconda3-<INSTALLER_VERSION>-Linux-x86_64.sh
# Include the bash command even if you aren't using the Bash shell # Replace ~/Downloads with the path to the installer file, if necessary # Replace <INSTALLER_VERSION> with the version of the installer file # For example, Anaconda3-2023.09-0-Linux-ppc64le.sh bash ~/Downloads/Anaconda3-<INSTALLER_VERSION>-Linux-ppc64le.sh
# Include the bash command even if you aren't using the Bash shell # Replace ~/Downloads with the path to the installer file, if necessary # Replace <INSTALLER_VERSION> with the version of the installer file # For example, Anaconda3-2023.09-0-Linux-aarch64.sh bash ~/Downloads/Anaconda3-<INSTALLER_VERSION>-Linux-aarch64.sh
# Include the bash command even if you aren't using the Bash shell # Replace ~/Downloads with the path to the installer file, if necessary # Replace <INSTALLER_VERSION> with the version of the installer file # For example, Anaconda3-2023.09-0-Linux-s390x.sh bash ~/Downloads/Anaconda3-<INSTALLER_VERSION>-Linux-s390x.sh
Press Enter to review the license agreement. Then press and hold Enter to scroll.
Enter
yes
to agree to the license agreement.Use Enter to accept the default install location, use CTRL+C to cancel the installation, or enter another file path to specify an alternate installation directory. If you accept the default install location, the installer displays
PREFIX=/home/<USER>/anaconda3
and continues the installation. It may take a few minutes to complete.Note
Anaconda recommends you accept the default install location. Do not choose the path as
/usr
for the Anaconda/Miniconda installation.Anaconda recommends you enter “yes” to initialize Anaconda Distribution by running
conda init
.If you enter “no”, then conda will not modify your shell scripts at all. In order to initialize conda after the installation process is done, run the following commands:
# Replace <PATH_TO_CONDA> with the path to your conda install source <PATH_TO_CONDA>/bin/activate conda init
For more information, see the FAQ.
The installer finishes and displays, “Thank you for installing Anaconda3!”
Close and re-open your terminal window for the installation to take effect, or enter the command
source ~/.bashrc
to refresh the terminal.You can also control whether or not your shell has the base environment activated each time it opens.
# The base environment is activated by default conda config --set auto_activate_base True # The base environment is not activated by default conda config --set auto_activate_base False # The above commands only work if conda init has been run first # conda init is available in conda versions 4.6.12 and later
-
Note
If you install multiple versions of Anaconda, the system defaults to the most current version, as long as you haven’t altered the default install path.
Problems?#
See Troubleshooting.
What’s next?#
Get started programming quickly with Anaconda in the Getting started with Anaconda guide.