# Previously working build fails with environment.yml packages not in env

**URL:** <https://discourse.jupyter.org/t/previously-working-build-fails-with-environment-yml-packages-not-in-env/6410>\
**Category:** Binder\
**Created:** [October 16, 2020, 5:11pm UTC](https://discourse.jupyter.org/t/previously-working-build-fails-with-environment-yml-packages-not-in-env/6410 "2020-10-16T17:11:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacquelinegarrahan](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jacquelinegarrahan/32/2900_2.png) [@jacquelinegarrahan](https://discourse.jupyter.org/u/jacquelinegarrahan)\
**Post date:** [October 16, 2020, 5:11pm UTC](https://discourse.jupyter.org/t/previously-working-build-fails-with-environment-yml-packages-not-in-env/6410/1 "2020-10-16T17:11:57Z")

</div>

Thank you in advance for your help.

Up until this week, I had a stable build relied upon for for a demo. I am using the jupyter proxy to serve a bokeh webpage, which now shows a 500.

> **[GitHub: jacquelinegarrahan/lume-model-server-demo/v0.1](https://mybinder.org/v2/gh/jacquelinegarrahan/lume-model-server-demo/v0.1?urlpath=%2Fproxy%2F5006%2Fsurrogate_model_client)**
>
> Click to run this interactive environment. From the Binder Project: Reproducible, sharable, interactive computing environments.

Further investigation suggests that the packages from the environment.yml are now not installed into conda environment. I am able to build successfully with repo2docker locally. Was there a change that might have caused this behavior?

Here is the link to the repository: [https://github.com/jacquelinegarrahan/lume-model-server-demo](https://github.com/jacquelinegarrahan/lume-model-server-demo)

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [October 16, 2020, 8:40pm UTC](https://discourse.jupyter.org/t/previously-working-build-fails-with-environment-yml-packages-not-in-env/6410/2 "2020-10-16T20:40:37Z")

</div>

repo2docker was recently updated to use mamba, which is a faster version of conda:

> <https://github.com/jupyterhub/repo2docker/pull/962>

Though it looks like the behaviour of mamba is different from conda when using your environment.yml file.

I’ve opened an issue here:

> <https://github.com/jupyterhub/repo2docker/issues/973>
>
> Bug description
> Some environment.yml files behave different with mamba than with conda.
> Reported at https://discourse.jupyter.org/t/previously-working-build-fails-with-environment-yml-packages-not-in-env/6410
> Expected behaviour
> Simple example (smaller version of https://github.com/jacquelinegarrahan/lume-model-server-demo/blob/9378eabeec86f577ce143f6bb9a9948cfdf79adf/environment.yml):
> name: lume-model-server-demo
> dependencies:
> -...

I haven’t seen that style of environment.yml file with `prefix::package` before, could you explain what it does? Thanks!

---

<div class="post-metadata">

**Author:** ![jacquelinegarrahan](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jacquelinegarrahan/32/2900_2.png) [@jacquelinegarrahan](https://discourse.jupyter.org/u/jacquelinegarrahan)\
**Post date:** [October 16, 2020, 8:58pm UTC](https://discourse.jupyter.org/t/previously-working-build-fails-with-environment-yml-packages-not-in-env/6410/4 "2020-10-16T20:58:55Z")

</div>

The prefix::package syntax specifies the conda channel to use for installation.  
In this case, jrgarrahan::lume-epics is a package I have hosted on anaconda cloud.

Thank you for getting back to me- this is very helpful! Are you aware if there is any way to pin the repo2docker version?

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [October 16, 2020, 9:00pm UTC](https://discourse.jupyter.org/t/previously-working-build-fails-with-environment-yml-packages-not-in-env/6410/5 "2020-10-16T21:00:42Z")

</div>

It’s not possible to pin the version of repo2docker on BinderHub/mybinder.

As a workaround you could try [specifying the channel at the top of your file](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#create-env-file-manually) instead? e.g.

```auto
channels:
  - conda-forge
  - jrgarrahan

```

---

<div class="post-metadata">

**Author:** ![jacquelinegarrahan](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jacquelinegarrahan/32/2900_2.png) [@jacquelinegarrahan](https://discourse.jupyter.org/u/jacquelinegarrahan)\
**Post date:** [October 16, 2020, 9:47pm UTC](https://discourse.jupyter.org/t/previously-working-build-fails-with-environment-yml-packages-not-in-env/6410/7 "2020-10-16T21:47:08Z")

</div>

This reformatting has resolved my issue. Thanks for your help!
