Reputation: 10113
I have a Jupyter notebook in GitHub and wanted to run it in Binder so other people can play with it.
However it complains that pandas is not installed. The error is:
ModuleNotFoundError: No module named 'pandas'
How can I get Binder to install pandas for this instance ?
Upvotes: 2
Views: 1610
Reputation: 6298
It is noteworthy to mention that the requirements.txt
file has to be created in the GitHub repository, not in the Binder UI. The Binder UI is also read only and will not sync any file back to GitHub. Any requirements.txt
in the Binder UI will not be picked up and also if reloading the runtime or refreshing the page it will not be considered. When the requirements.txt
is created, launch again Binder UI start page pointing to the GitHub repository.
Upvotes: 0
Reputation: 10113
You had to edit/create requirements.txt
at the base of the repo. I have tried to use the pip install method in a cell and this did not work for Binder as it prevents live installations in your session.
You can list the modules you need and specify versions if you need to.
There is an example in this GitHub:
Contents are:
numpy==1.16.*
matplotlib==3.*
seaborn==0.8.1
pandas
Upvotes: 1