Code Monkey home page Code Monkey logo

requirements's Introduction

Python environment with a requirements.txt

Binder

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 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.

requirements's People

Contributors

betatim avatar cclauss avatar choldgraf avatar manics avatar minrk avatar tybalduf avatar yuvipanda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

requirements's Issues

requirements.txt incomplete?

at least in some environments (anaconda python3.6) pip won't install seaborn-0.8.1 dependencies scipy, pandas. Changing seaborn==0.9.* or adding scipy,pandas to requirements.txt would fix.

Consider making repo a GitHub template repository

As GitHub now allows for repos to be template repositories that allow repos to be used as base seeds for others. It could be useful if this repo could be turned into one.

That being said, I'm not sure if that defeats the purpose if part of the idea of the repo is "hey, here's a really small example of how to do this, now having seen this please go take this information and make your own".

Example of a GitHub template repo: https://github.com/matthewfeickert/talk-template

tsplot removed from seaborn

Not a crucial issue, but the tsplot function was removed from seaborn earlier this year in v0.10.0. The corresponding plot still appears when the example binder is opened, but trying to rerun the cell leads to an error. The Seaborn site says that tsplot can be replaced with lineplot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.