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
- Conda Clean – How to Free up GIGABYTES of Space - November 28, 2022
- Using Virtual Environments in Python – Quickly Comparing 2 Environment Managers - November 21, 2022
- When to Upgrade Technology – Don’t Panic Podcast Episode 349 - November 18, 2022