What is an Environment File?
Environment files contain a description of a programming environment including the language and packages to be installed. It is a lightweight text file formatted in YAML, an easily readable markup language. These files are generally operating system independent and can contain version restrictions on packages.
Why Share Your Python Environment?
Environment files make it easy to setup a copy of your environment. This can be useful for sharing your work with collaborators, others in your research group, and other programmers. It is also handy when your environment becomes damaged or your laptop dies! If you version control the file (which we consider a best practice), you also have a history of the tools used in your research to more easily track down any mysterious reproducibility issues.
Example Environment File
Be sure to watch the video for details on how to create environment files and use them, but here’s an example file that can be a good starting point when creating your own.
name: myenv channels: - conda-forge - defaults dependencies: - python - pip - metpy - siphon - matplotlib - pandas - xarray - pip: - cfgrib
- Spring Slider Earthquake Machine – Software Version 1.1 Released and Open Sourced! - February 14, 2023
- Sediment Provenance with Microscopes and Raman – Don’t Panic Podcast Episode 352 - December 23, 2022
- XArray Multidimensional Groupby – Quick Data Analysis in 1 line! - December 19, 2022