https://github.com/binder-examples/requirements
Simple requirements.txt based example
https://github.com/binder-examples/requirements
binder binder-ready
Last synced: 5 months ago
JSON representation
Simple requirements.txt based example
- Host: GitHub
- URL: https://github.com/binder-examples/requirements
- Owner: binder-examples
- License: bsd-3-clause
- Created: 2017-07-24T20:06:00.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-11-09T21:04:26.000Z (over 1 year ago)
- Last Synced: 2024-08-09T02:17:43.747Z (8 months ago)
- Topics: binder, binder-ready
- Language: Jupyter Notebook
- Homepage:
- Size: 601 KB
- Stars: 76
- Watchers: 9
- Forks: 319
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - binder-examples/requirements - Simple requirements.txt based example (Jupyter Notebook)
README
# Python environment with a requirements.txt
[](http://mybinder.org/v2/gh/binder-examples/requirements/HEAD)
A Binder-compatible repo with a `requirements.txt` file.
Access this Binder at the following URL
http://mybinder.org/v2/gh/binder-examples/requirements/HEAD
## Notes
The `requirements.txt` file should list all Python libraries that your notebooks
depend on, and they will be installed using:```
pip install -r requirements.txt
```The base Binder image contains no extra dependencies, so be as
explicit as possible in defining the packages that you need. This includes
specifying explicit versions wherever possible.If you do specify strict versions, it is important to do so for *all*
your dependencies, not just direct dependencies.
Strictly specifying only some dependencies is a recipe for environments
breaking over time.[pip-compile](https://github.com/jazzband/pip-tools/) is a handy
tool for combining loosely specified dependencies with a fully frozen environment.
You write a requirements.in with just the dependencies you need
and pip-compile will generate a requirements.txt with all the strict packages and versions that would come from installing that package right now.
That way, you only need to specify what you actually know you need,
but you also get a snapshot of your environment.In this example we include the library `seaborn` which will be installed in
the environment, and our notebook uses it to plot a figure.