Update tech_docs/linux/conda_install.md

This commit is contained in:
2024-05-12 03:32:01 +00:00
parent 3d17c531ee
commit 4ea0937ab3

View File

@@ -1,95 +1,61 @@
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: Here's a concise step-by-step guide to download, verify the hash, and set up Conda on your Debian 12 system:
1. Update your system: 1. Update your system:
- Open a terminal and run the following command to update your system: ```
``` sudo apt update && sudo apt upgrade
sudo apt update && sudo apt upgrade ```
```
2. Install required dependencies: 2. Install required dependencies:
- Run the following command to install the necessary dependencies: ```
``` sudo apt install wget gpg python3 python3-pip
sudo apt install wget gpg ```
```
3. Download the Miniconda installer: 3. Download the Miniconda installer:
- Navigate to the directory where you want to download the installer, for example: ```
``` cd ~/Downloads
cd ~/Downloads wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
``` ```
- 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: 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
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh.sha256 sha256sum Miniconda3-latest-Linux-x86_64.sh
``` cat 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: 5. Install Miniconda:
- Make the installer executable: ```
``` chmod +x Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh ./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: 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
source ~/.bashrc conda --version
``` conda init bash
- 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): 7. Create a Conda environment:
- Run the following command to update Conda to the latest version: ```
``` conda create --name myenv python=3.12
conda update conda conda activate myenv
``` ```
8. Create a Conda environment (optional): 8. Update pip and install packages within the environment:
- Run the following command to create a new Conda environment with Python and Jupyter Notebook: ```
``` python3 -m pip install --upgrade pip
conda create --name myenv python=3.12 jupyter python3 -m pip install jupyter numpy pandas matplotlib
``` ```
- 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. 9. Launch Jupyter Notebook from the active environment:
```
jupyter notebook
```
You can now start using Conda to manage packages, create environments, and run Python and Jupyter Notebooks. 10. Deactivate the environment when done:
```
conda deactivate
```
Remember to replace `myenv` with your desired environment name and adjust the Python version according to your requirements. Remember to replace `myenv` with your desired environment name and adjust the Python version and package list according to your requirements.
Let me know if you have any further questions or need additional assistance!