Files
the_information_nexus/tech_docs/linux/conda_install.md

3.3 KiB

Certainly! Here's a more detailed step-by-step guide to download, verify the hash, and properly set up Conda on your Debian 12 system:

  1. Update your system:

    • Open a terminal and run the following command to update your system:
      sudo apt update && sudo apt upgrade
      
  2. Install required dependencies:

    • Run the following command to install the necessary dependencies:
      sudo apt install wget gpg
      
  3. Download the Miniconda installer:

    • Navigate to the directory where you want to download the installer, for example:
      cd ~/Downloads
      
    • Run the following command to download the latest Miniconda installer for Linux 64-bit:
      wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
      
  4. Verify the hash of the downloaded installer:

    • Download the Miniconda hash file:
      wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh.sha256
      
    • Calculate the SHA256 hash of the downloaded installer:
      sha256sum Miniconda3-latest-Linux-x86_64.sh
      
    • Compare the calculated hash with the expected hash provided in the downloaded hash file:
      cat Miniconda3-latest-Linux-x86_64.sh.sha256
      
    • If the calculated hash matches the expected hash, proceed with the installation. If not, download the installer again.
  5. Install Miniconda:

    • Make the installer executable:
      chmod +x Miniconda3-latest-Linux-x86_64.sh
      
    • Run the installer:
      ./Miniconda3-latest-Linux-x86_64.sh
      
    • Follow the installation prompts:
      • Press Enter to continue
      • Press Space to scroll through the license agreement, then type yes to accept it
      • Press Enter to confirm the installation location or specify a different location
      • Type yes to initialize Conda and add it to your shell's PATH
  6. Initialize Conda:

    • Close and reopen your terminal for the changes to take effect, or run the following command to refresh your shell's environment:
      source ~/.bashrc
      
    • Verify that Conda is installed and working properly:
      conda --version
      
    • Initialize Conda for your shell (e.g., bash or zsh):
      conda init bash
      
      or
      conda init zsh
      
  7. Update Conda (optional):

    • Run the following command to update Conda to the latest version:
      conda update conda
      
  8. Create a Conda environment (optional):

    • Run the following command to create a new Conda environment with Python and Jupyter Notebook:
      conda create --name myenv python=3.12 jupyter
      
    • Activate the environment:
      conda activate myenv
      

By following these detailed steps, you will have downloaded the Miniconda installer, verified its integrity using the hash, installed Miniconda on your Debian 12 system, initialized Conda for your shell, and optionally created a Conda environment.

You can now start using Conda to manage packages, create environments, and run Python and Jupyter Notebooks.

Remember to replace myenv with your desired environment name and adjust the Python version according to your requirements.

Let me know if you have any further questions or need additional assistance!