Skip to content

Instantly share code, notes, and snippets.

@geosharma
Last active February 15, 2025 14:25

Revisions

  1. geosharma revised this gist Oct 9, 2019. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions conda_snippets.md
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,12 @@
    # Conda and Anaconda commands
    A list of conda commands that I regularly use but keep forgetting how to use

    ## Update conda
    ``conda update conda``

    ## Conda create a new environment with desired python verion
    ``conda create --name envname python=pythonversion``
    If no python=pythonversion is given it will install the default python3 version for the installed anaconda or conda
    If no python=pythonversion is given it will install the default python version for the installed anaconda or conda

    ## List all environments
    ``conda evn list``
    @@ -19,10 +20,12 @@ If no python=pythonversion is given it will install the default python3 version
    ## Install a package from a particular channel
    ``conda install --channel channelname pacakgename``

    ## Update packages
    ## Update package a specific package
    ``conda update packagename``

    ## Update all packages in the current environment
    ``conda update --all``

    ## Update all packages in a particular environment
    ``conda update -n envname --all``

  2. geosharma revised this gist Oct 9, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions conda_snippets.md
    Original file line number Diff line number Diff line change
    @@ -21,6 +21,8 @@ If no python=pythonversion is given it will install the default python3 version

    ## Update packages
    ``conda update packagename``

    ``conda update --all``

    ``conda update -n envname --all``

  3. geosharma revised this gist Oct 9, 2019. No changes.
  4. geosharma revised this gist Oct 9, 2019. No changes.
  5. geosharma renamed this gist Oct 9, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. geosharma created this gist Oct 9, 2019.
    26 changes: 26 additions & 0 deletions conda snippets
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    # Conda and Anaconda commands

    ## Update conda
    ``conda update conda``

    ## Conda create a new environment with desired python verion
    ``conda create --name envname python=pythonversion``
    If no python=pythonversion is given it will install the default python3 version for the installed anaconda or conda

    ## List all environments
    ``conda evn list``

    ## Delete an envnironment
    ``conda env remove --name envname``

    ## Install a pacakge in a different environment
    ``conda install --name envname pacakgename``

    ## Install a package from a particular channel
    ``conda install --channel channelname pacakgename``

    ## Update packages
    ``conda update packagename``
    ``conda update --all``
    ``conda update -n envname --all``