Skip to content

Instantly share code, notes, and snippets.

@James-Leslie
Last active August 13, 2024 00:54
Show Gist options
  • Save James-Leslie/c58a7aaef5c0255b49efdbf293c33bfb to your computer and use it in GitHub Desktop.
Save James-Leslie/c58a7aaef5c0255b49efdbf293c33bfb to your computer and use it in GitHub Desktop.
Example of a conda `environment.yml` file containing a few popular packages

Example conda environment file

Conda documentation

1. File structure

name: <environment-name>
channels:
  - conda-forge
dependencies:
  - python=3.10
  - ipython
  - ipykernel
  - ipywidgets
  - matplotlib
  - numpy
  - pandas
  - plotly::plotly
  - pip:
    - keyring 
    - artifacts-keyring
    - --extra-index-url https://<ORGANIZATION NAME>.pkgs.visualstudio.com/<PROJECT NAME>/_packaging/<FEED NAME>/pypi/simple

2. Installation

conda env create -f environment.yml

3. Updating

If any additional packages have been added to the file, then update using

conda env update -f environment.yml --prune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment