Package requirements woes

Hello Jupyter/Binder community,

I have a fairly simple Jupyter repo which I’m looking at again after a period of neglect. The last time I looked at this project, the requirements as of this commit were sufficient for Binder to serve my notebook, however this no longer seems to work. Could anyone offer advice as to how to start to debug this sort of problem?

Note, the most recent requirements.txt in the repo features explicit package versions, which I recently updated (and seem to be sufficient for running a Jupyter notebook locally, and also running the Python app included as part of the repo), but these also don’t seem to play well with Binder.


Dear @stuwilmur,

The log of the build from is very clear:

ERROR: Could not find a version that satisfies the requirement opencv-python-headless== (from versions:,,,,,,,,,,,,,,,,,,,,,,,,,,,,
ERROR: No matching distribution found for opencv-python-headless==

Full log at

1 Like

As it stands, what you have is quite the opposite of a ‘fairly simple’ repo.
As you point out, you pinned a number of dependencies there and are overlapping with infrastructure that mybinder needs to set itself.

Luckily, there is an easy solution to this. You can leave the requirements.txt that you have in root that specifies things you want to use for local & app and as a record of the packages that played well in your local installation as part of that app. What you want to do is set up an alternative requirements.txt that is just for MyBinder to use. You can do that in a new directory you’ll make in the root of your repo. The new directory has to be named binder, see here. The BinderHub build system will look for configuration files in the binder directory first and if it finds them it ignores anything in the root. That way you can leave your situation in root as it stands, but configure your MyBinder build specifically. You want to have in the binder directory only the packages you need to install when you launch from here and try to run your notebooks there, and to ideally specify no versions, like you seemed to have had in the past there in that old commit.

For the record:

A. Your old one still builds, try here. However, for now it is failing to launch. I don’t understand quite why though. It may be something you cannot control in the system as I don’t see it pushing the image after the build. It may a temporary glitch in the system (again, in a part you have no control over). I don’t know. Hopefully it is moot because you want to use the updated version anyways; however, it would give you another point of information about what works in the configuration files.

B. Upon triggering build right now, I see:

ERROR: Could not find a version that satisfies the requirement opencv-python-headless== (from versions:,,,,,,,,,,,,,,,,,,,,,,,,,,,,

The allowed options for opencv-python-headless versions are listed there and don’t match your setting. Hopefully this also becomes moot, too, with the new direction.

Thank you @fomightez for the thorough response! It is very much appreciated.

Yes, I should have been more specific when I described it as a simple repo: as you point out, it is currently trying to do several things at once from a configuration point of view.

I did actually wonder if the failure to launch was transient when I tried rolling back the requirements to the “old” way.

I will follow your suggestion of creating a ./binder/requirements.txt and will see what happens.

It works fine in regards to building, launching, and running Interface.ipynb:

Launch my fork with this link.
my fork of the sim-eye repo

1 Like

Thanks again @fomightez: I pulled across your changes and my notebook is working again. Thanks for the education about the binder infrastructure. :grinning:

1 Like