Specifying a conda environment with environment.yml
Go to file
Mike Boyle e4602f2094
Update README.md
Two small — though important — changes

  1. Since [the release of conda 4.6](https://www.anaconda.com/blog/conda-4-6-release), the [recommended way to activate a conda env](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#activating-an-environment) is to use `conda activate <myenv>`.
  2. The [conda docs say](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#exporting-an-environment-file-across-platforms) that the correct way to export an env is to use the `--from-history` flag.  This only includes packages that you’ve explicitly asked for, and only "pins" versions when you asked to do so.  If you use this flag, the "macOS-specific" packages probably won't appear.
2020-06-29 15:46:05 -04:00
environment.yml Update environment.yml 2018-12-11 15:00:35 +01:00
index.ipynb updating to new syntax 2017-07-27 15:13:33 -07:00
LICENSE Create LICENSE 2019-03-26 08:52:02 -07:00
README.md Update README.md 2020-06-29 15:46:05 -04:00

Conda environment with environment.yml

Binder

A Binder-compatible repo with an environment.yml file.

Access this Binder by clicking the blue badge above or at the following URL:

http://mybinder.org/v2/gh/binder-examples/conda_environment/master?filepath=index.ipynb

Notes

The environment.yml file should list all Python libraries on which your notebooks depend, specified as though they were created using the following conda commands:

conda activate example-environment
conda env export --from-history -f environment.yml

Note that the only libraries available to you will be the ones specified in the environment.yml, so be sure to include everything that you need!

Also note that if you skip the --from-history, conda may include OS-specific packages in environment.yml, which you would have to manually prune from environment.yml. For example, confirmed macOS-specific packages that should be removed are:

  • libcxxabi=4.0.1
  • appnope=0.1.0
  • libgfortran=3.0.1
  • libcxx=4.0.1