Uploading environment file when executing jupyter notebook file

Dear Developers,

I have a Jupyter notebook file I’m trying to execute with Binder.
The script includes a package called cimcb_lite.
I added an environment.yml file with all the packaged needed to the notebook to the gitHub repo where the notebook exists.
However, where I run the notebook using the Binder there is the error:

Is there anything else that needed to be done besides adding the file github repo?

Edit:
this is the link to the github

and the relevant files there are:

  1. Report.ipynb - what I’m trying to upload to Binder
  2. environment.yml - the environment packages
  3. functions.py - it’s a python file with functions that Report.ipynb uses

If there is anything else that could be useful please tell me

Many thank!
Tal

Hi! Please can you provide a link to your GitHub repo? That will make it easier for someone to help you.

1 Like

environment.yml installs things via conda by default, see the binder documentation about this here.

If you search the terms ‘anaconda cimcb-lite’ in Google search engine, you don’t get anything at the Anaconda site, which is what leads to the highlighted Problem: nothing provides requested cimcb-lite in your screen shot. By contrast, searching ‘anaconda openpyxl’, another package you list in your environment.yml file, should fairly easily lead you to here showing how conda can install openpyxl.
cimcb-lite is available via the Python Package Index, which uses the Python Package manager pip to install packages, see here.

The documentation about using the environment.yml in Binder highlights the following though:

You can install files from pip in your environment.yml as well. For example, see the binder-examples environment.yml file.

That links to here where you can see how you can add a pip sub-section to your environment.yml for packages that only pip can provide.
Note that the best practice is to have Anaconda also install pip by listing it in the main section. You’ll see a warning if you don’t include that although usually installation will still occur.

2 Likes

Thank you very much for the detailed answer, much appreciated!
It solved this issue :slight_smile:

1 Like