Requirements
Simple requirements.txt based example
Install / Use
/learn @binder-examples/RequirementsREADME
Python environment with a requirements.txt
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.
If the root requirements.txt for some reason doesn't align with the dependencies
you need in your Binder environment, you can create a requirements.txt file in
a .binder folder that will take precedent!
pip-compile 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.
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
