# Binder getting stuck while installing conda's environment.yml

**URL:** <https://discourse.jupyter.org/t/binder-getting-stuck-while-installing-condas-environment-yml/8680>\
**Category:** repo help\
**Created:** [April 8, 2021, 4:34am UTC](https://discourse.jupyter.org/t/binder-getting-stuck-while-installing-condas-environment-yml/8680 "2021-04-08T04:34:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![edublancas](https://avatars.discourse-cdn.com/v4/letter/e/ebca7d/32.png) [@edublancas](https://discourse.jupyter.org/u/edublancas)\
**Post date:** [April 8, 2021, 4:34am UTC](https://discourse.jupyter.org/t/binder-getting-stuck-while-installing-condas-environment-yml/8680/1 "2021-04-08T04:34:03Z")

</div>

Hi,

First of all, I wanted to thank Binder contributors for this amazing project. It’s been extremely valuable to showcase my open-source project.

I’ve been using Binder without any issues for quite a while but today I ran into a problem. I updated my binder [environment](https://github.com/ploomber/binder-env) (upgraded a few dependencies), which uses a conda’s `environment.yml` but now Binder gets stuck while setting up the environment.

These are the last lines:

```auto
Enabling notebook extension jupyter-js-widgets/extension...
      - Validating: OK

done
Installing pip dependencies: ...working...

```

Looks like conda is unable to install dependencies in the `pip` section.

Is there any way to make the output more verbose or troubleshoot this kind of thing?

[Here’s the binder link](https://mybinder.org/v2/gh/ploomber/binder-env/main?urlpath=git-pull%3Frepo%3Dhttps%253A%252F%252Fgithub.com%252Fploomber%252Fprojects%26urlpath%3Dlab%252Ftree%252Fprojects%252Fspec-api-python%252FREADME.ipynb%26branch%3Dmaster)

Any help would be much appreciated!

---

<div class="post-metadata">

**Author:** ![sgibson91](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/sgibson91/32/487_2.png) [@sgibson91](https://discourse.jupyter.org/u/sgibson91)\
**Post date:** [April 8, 2021, 5:54am UTC](https://discourse.jupyter.org/t/binder-getting-stuck-while-installing-condas-environment-yml/8680/2 "2021-04-08T05:54:19Z")

</div>

I would try running the build locally with repo2docker [https://repo2docker.readthedocs.io](https://repo2docker.readthedocs.io) IIRC, it has a debug flag

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [April 8, 2021, 4:34pm UTC](https://discourse.jupyter.org/t/binder-getting-stuck-while-installing-condas-environment-yml/8680/3 "2021-04-08T16:34:28Z")

</div>

A couple of things to try in addition to or before trying a local build…

One simple idea to try would be to include `pip` as a dependency. For several months I had been seeing it in the MyBinder build stream noted that something was saying soon including `pip` as a dependency is required. So I started including it a while ago in new or updated `environment.yml`. I note that yours doesn’t have it.

See an example here:

> <https://github.com/fomightez/cl_sq_demo-binder/blob/cf53e363902d2457155b3ad49484ea8d1fe2d207/environment.yml>

You have a complex set of requirements in your `environment.yml` and then you specify an old version of Python. Sometimes mixing pinning and unpinning is a bad idea. So a related idea would be to listing pip earlier and also unpinning everything in a simpler, separate repo and then build back up to see where breaks.

---

<div class="post-metadata">

**Author:** ![edublancas](https://avatars.discourse-cdn.com/v4/letter/e/ebca7d/32.png) [@edublancas](https://discourse.jupyter.org/u/edublancas)\
**Post date:** [April 8, 2021, 5:33pm UTC](https://discourse.jupyter.org/t/binder-getting-stuck-while-installing-condas-environment-yml/8680/4 "2021-04-08T17:33:54Z")

</div>

Hi @fomightez thanks for your suggestion!

Here’s the solution in case anyone encounters a similar problem:

I added pip in the environment.yml but that didn’t help. Then I removed the pinned Python version and it started working again. Based on the logs, it seems that it was a conda problem (not a binder problem): it was getting stuck trying to resolve the environment.

Thanks @sgibson91 for the suggestion on repo2docker, I didn’t know I could use that for local debugging.

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [April 8, 2021, 6:22pm UTC](https://discourse.jupyter.org/t/binder-getting-stuck-while-installing-condas-environment-yml/8680/5 "2021-04-08T18:22:09Z")

</div>

Glad actually to hear that adding the `pip` in the listing wasn’t the issue. That’s going to break a lot of things if the requirement of including it, implied by the warning I had seen, ever does get put into effect.
