Skip to content

Commit

Permalink
Merge pull request #244 from 4k4xs4pH1r3/deepsource-transform-6272f56f
Browse files Browse the repository at this point in the history
style: format code with Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf
  • Loading branch information
4k4xs4pH1r3 authored Nov 23, 2024
2 parents 9922f9c + d9b3886 commit 971bcae
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions Python/Anaconda/conda.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Pre-Requiste
[Install Anaconda](https://www.anaconda.com/download/success)

[Install Anaconda](https://www.anaconda.com/download/success)

# Optimize Your Conda Environment | Using Python 3.13 (in 10 Steps)

Expand All @@ -8,49 +9,57 @@
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" may provides a more reliable fallback option.

3. **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").
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
```

**Configure Solver & Update Base:** Set the solver to "libmamba"), then update Conda and all packages in the base environment (including from "conda-forge").

**Configure Solver & Update Base:** Set the solver to "libmamba"), then update Conda and all packages in the base environment (including from "conda-forge").

```bash
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
```

4. **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
```

5. **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
```

6. **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
```

7. **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

## macOS + Linux
```bash
python -m ensurepip --upgrade; pip install --upgrade pip; pip list --format=freeze | awk -F '==' '{print $1}' | xargs -n1 pip install -U
```

## Windows PowerShell
```bash
python -m ensurepip --upgrade; pip list --format=freeze | ForEach-Object {$_.Split('==')[0]} | ForEach-Object {pip install -U $_}

```bash
python -m ensurepip --upgrade; pip list --format=freeze | ForEach-Object {$_.Split('==')[0]} | ForEach-Object {pip install -U $_}
```

8. **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
```

9. **Log in to Anaconda Cloud (Optional):**
8. **Log in to Anaconda Cloud (Optional):**
```bash
anaconda login
```
Expand All @@ -61,7 +70,6 @@

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


10. **Conda cheat sheet:**

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

0 comments on commit 971bcae

Please sign in to comment.