Install Anaconda on Debian and Ubuntu

Install Anaconda on Debian and Ubuntu

Setting up Python on Ubuntu or Debian starts with choosing how to install the tools a project needs. Anaconda Distribution includes conda, which installs packages and manages separate software environments.

I’ll explain how to install Anaconda from its Linux shell installer and create a separate environment for a project.

TL;DR

Install Anaconda Distribution on Debian or Ubuntu by downloading the current Linux shell installer that matches your CPU architecture, checking its SHA-256 value against Anaconda’s archive, and following its prompts.

  • Use the x86_64 installer for 64-bit Intel or AMD Linux, or the aarch64 installer for ARM64 when supported by your device.
  • Install in your home directory unless you have a specific reason and permissions to choose another prefix.
  • Initialize the shell you use, reopen it, and confirm conda is available.

What is Anaconda Distribution?

Anaconda Distribution is a Python and R distribution that includes conda, a tool for installing packages and managing separate software environments. The Linux installer is a shell script, not a Debian package installed with apt. I checked the current install path against Anaconda’s Linux guide because its versioned installer filenames change over time.

Conda environments keep project dependencies separate. A project can use one Python and package set. Another project can use different versions without placing every dependency in the system Python.

Anaconda includes a broad package collection, while Miniconda is a smaller alternative. Choose Anaconda when you want the Distribution’s included tools. Both use conda to manage packages and environments, so the install steps below apply to Anaconda.

The command-line installation does not require the optional graphical libraries sometimes used by Anaconda Navigator. Install those only if the desktop interface needs them. Keeping the main installation in your own home directory also avoids changing system-wide Python files.

How to install Anaconda on Debian and Ubuntu

Use Anaconda’s current Linux installer and select the filename that matches the machine’s architecture. I use the home-directory installation because it does not need system-wide permissions and is simple to remove or manage as a user.

Step 1: Check the Linux architecture

The command only reads the machine’s architecture. It does not install or change anything. If you also need to confirm the Ubuntu release, use this Ubuntu version check.

uname -m
aarch64
Terminal output showing the Linux architecture as aarch64

An x86_64 result calls for the x86_64 installer, while aarch64 calls for the ARM64 installer. Anaconda notes that some Raspberry Pi configurations may not support its aarch64 builds because they target server-class Neoverse N1/N2 processors. Check device compatibility rather than assuming every ARM board is covered by the build.

Step 2: Download the matching installer

Open the official Anaconda archive and copy the current shell-installer filename for the architecture you checked. Release filenames change, so do not reuse an old versioned address from a tutorial. Confirm that the file is listed in the archive before you download it.

For example, Anaconda’s guide uses a filename with the Linux architecture in its suffix. Select the current matching entry in the archive, then download that file. Confirm the archive still lists the release before you run its installer.

wget https://repo.anaconda.com/archive/Anaconda3-2026.07-1-Linux-x86_64.sh

For ARM64, use the current archive entry ending in Linux-aarch64.sh. You can use curl instead of wget, following this cURL download guide, but keep the downloaded filename and the later hash and installer commands consistent.

Step 3: Verify the installer checksum

SHA-256 is a cryptographic hash that gives a file a value you can compare with the value published for that exact installer. Generate the local value before running the script:

sha256sum ~/Anaconda3-2026.07-1-Linux-x86_64.sh

Find the matching installer entry in Anaconda’s official archive and compare the full SHA-256 strings. The filename, architecture, and release must match on both sides. Stop if even one character differs.

Do not execute a file with a different hash. Download it again and compare once more. A mismatch can mean an incomplete transfer or a file that Anaconda did not publish.

Step 4: Run the interactive installer

Run the verified installer with Bash. The Linux shell-script guide explains why Bash can run a script without changing its executable permission. Keep the filename aligned with the download, including the aarch64 suffix when installing on a compatible ARM64 system.

bash ~/Anaconda3-2026.07-1-Linux-x86_64.sh

Read the Terms of Service prompt and enter the requested response if you agree. Press Return to accept the default prefix under your home directory, or enter another directory you own. A system location such as /opt requires the relevant permissions and is not needed for a personal user install.

When asked whether to initialize conda, accept if you want conda commands available in new interactive shells. The installer changes shell startup configuration for that purpose. If you decline, the files are still installed, but you will need to initialize the shell later or use conda’s full path.

Step 5: Load shell initialization and verify conda

Close and reopen the terminal after installation, as Anaconda recommends. In Bash, you can load the updated startup file in the current terminal instead:

source ~/.bashrc

For Zsh, load ~/.zshrc instead. Then run conda list to check that conda can find the installed environment and display its packages.

An active base environment may appear in the prompt, but you do not have to keep base active for every project. If you need to inspect a shell configuration file, our nano editor guide covers opening and saving it.

Step 6: Create a separate environment for a project

Create a named environment with the Python version and packages the project needs. For example, this command asks conda to create an environment named analysis with Python and NumPy:

conda create --name analysis python numpy

After conda finishes resolving and installing dependencies, activate the environment with conda activate analysis. Use conda deactivate when you want to leave it. Installing project packages in a named environment keeps changes away from base and makes it clearer which dependencies belong to that project.

Common errors and checks after installation

If the installer finished but the shell cannot find conda, first open a new terminal so it reads the updated startup file. This is preferable to editing PATH by hand because conda initialization sets up shell functions needed by activation.

SymptomCheckNext step
Installer says wrong architecture or will not runCompare uname -m with the filenameDownload the matching supported build
SHA-256 values differConfirm filename and release matchDo not run it. Download again and recheck
conda command not foundConfirm shell and initialization choiceReopen shell or initialize the correct shell
Navigator does not startCheck whether GUI dependencies are presentInstall only the documented dependencies for the distro

For Fish, the Bash source ~/.bashrc command does not apply. Anaconda documents fish_add_path for adding the conda binary path and conda init fish for configuring Fish. Use the instructions for your shell rather than copying Bash configuration into another shell.

Anaconda Navigator is a separate graphical way to work with environments. Its Linux GUI dependencies are optional for the command line and depend on the distribution. The old prerequisite command often copied into install guides should not be treated as a requirement for installing conda itself.

VS Code is a code editor. Anaconda provides Python tooling and environment management. They can be used together, so one does not replace the other.

See our guide to installing Visual Studio Code on Linux if you want to set up the editor too.

The shell startup file tells an interactive terminal where to find conda and provides activation logic. A new terminal reads that file. An existing shell does not reread it automatically.

Navigator’s optional GUI dependencies are separate from Python packages. A machine without a desktop can still use conda in a terminal. Check Anaconda’s dependency list before adding GUI libraries.

For a project that needs a reproducible setup, record the packages it uses in an environment specification after creating the environment. That gives another machine a description of the required packages, rather than relying on an undocumented collection installed in base. Conda’s environment guide describes environment files and commands for creating an environment from them.

Conclusion: verify the shell before using conda

The reliable path is to match the official Linux installer to the machine, verify its SHA-256 value, and let the installer configure the shell you use. Confirm conda in a new terminal, then create a named environment for the project rather than treating base as the project workspace.

For the exact current installer filenames, use Anaconda’s Linux installation guide. Conda’s environment management documentation covers creating and activating environments.

FAQ

These answers cover the installation questions that commonly follow the Linux installer steps.

How do I install Anaconda in the Linux terminal?

Download the current Anaconda Linux shell installer for your architecture, compare its SHA-256 hash with the official archive, run it with Bash, initialize your shell, and verify with conda list.

How do I install Anaconda on Ubuntu?

Use the same official Linux installer workflow on Ubuntu: choose the matching architecture, verify the installer hash, run the script, and reopen your initialized shell.

Is Anaconda installed with apt?

No. Anaconda Distribution for Linux is installed by running its downloaded shell installer. Optional apt packages apply to Navigator’s graphical dependencies, not the core conda installation.

Is Anaconda better than VS Code?

They serve different purposes. Anaconda provides Python distribution and environment tools; VS Code is a code editor, and they can be used together.