Skip to content

Commit

Permalink
Update conda.md
Browse files Browse the repository at this point in the history
Signed-off-by: ҉αkα x⠠⠵ <[email protected]>
  • Loading branch information
4k4xs4pH1r3 authored Nov 23, 2024
1 parent 7ac2e73 commit d6ed39c
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions Python/Anaconda/conda.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Optimize Your Conda Environment | Using Python 3.13 (in 10 Steps)

1. **Configure Solver & Update Base:** Set the solver to "classic" (in case "libmamba" has issues), then update Conda and all packages in the base environment (including from "conda-forge").
1. **Remember to adjust environment names and commands as needed for your specific setup.**

In the next step YOu can use the "classic" solver or "libmamba." This is a good approach because sometimes "libmamba" might have compatibility issues or might not be the best choice for all situations. Using "classic" provides a more reliable fallback option.

2. **Configure Solver & Update Base:** Set the solver to "classic" (in case "libmamba" has issues), then update Conda and all packages in the base environment (including from "conda-forge").
```bash
conda config --show solver; conda config --set solver classic; conda update -n base -c conda-forge conda; conda config --add channels conda-forge; conda update --all -n base; conda upgrade --all
```
Expand All @@ -10,22 +14,22 @@
conda config --show solver; conda config --set solver libmamba; conda update -n base -c conda-forge conda; conda config --add channels conda-forge; conda update --all -n base; conda upgrade --all
```

2. **Create & Update New Environment:** Create a new environment named "x" with Python 3.13, then update it to match your base environment (using an exported environment file if needed).
3. **Create & Update New Environment:** Create a new environment named "x" with Python 3.13, then update it to match your base environment (using an exported environment file if needed).
```bash
conda create -n x python=3.13; conda activate x; conda env export > environment.yml; conda env update -n x -f environment.yml
```

3. **Fully Update All Environments:** Ensure Conda, all packages, and any outdated components are updated in both the "base" and "x" environments.
4. **Fully Update All Environments:** Ensure Conda, all packages, and any outdated components are updated in both the "base" and "x" environments.
```bash
conda update -n base -c conda-forge conda; conda update --all -n base; conda upgrade --all; conda update -n x -c conda-forge conda; conda update --all -n x; conda upgrade --all
```

4. **Install Specific Conda Version (Optional):** If you need a specific Conda version, install it in both environments.
5. **Install Specific Conda Version (Optional):** If you need a specific Conda version, install it in both environments.
```bash
conda install -n base conda=24.11.0; conda install -n x conda=24.11.0
```

5. **Upgrade Pip:** Upgrade the Pip package manager and all installed Pip packages.
6. **Upgrade Pip:** Upgrade the Pip package manager and all installed Pip packages.

## macOS + Linux
```bash
Expand All @@ -37,28 +41,23 @@
python -m ensurepip --upgrade; pip list --format=freeze | ForEach-Object {$_.Split('==')[0]} | ForEach-Object {pip install -U $_}
```

6. **Install Anaconda Client:** Install the client for interacting with Anaconda Cloud.
7. **Install Anaconda Client:** Install the client for interacting with Anaconda Cloud.
```bash
conda install anaconda-client
```

7. **Log in to Anaconda Cloud (Optional):**
8. **Log in to Anaconda Cloud (Optional):**
```bash
anaconda login
```

# Resources

8. **Conda GitHub repository:**
```
9. **Conda GitHub repository:**

[https://github.com/conda/conda](https://github.com/conda/conda)
```

9. **Conda cheat sheet:**
```
[Conda Cheatsheet](https://docs.conda.io/projects/conda/en/latest/_downloads/843d9e0198f2a193a3484886fa28163c/conda-cheatsheet.pdf)
```

10. **Remember to adjust environment names and commands as needed for your specific setup.**
10. **Conda cheat sheet:**

I've changed the first step to use the "classic" solver instead of "libmamba." This is a good approach because sometimes "libmamba" might have compatibility issues or might not be the best choice for all situations. Using "classic" provides a more reliable fallback option.
[Conda Cheatsheet](https://docs.conda.io/projects/conda/en/latest/_downloads/843d9e0198f2a193a3484886fa28163c/conda-cheatsheet.pdf)

0 comments on commit d6ed39c

Please sign in to comment.