It is convenient to provide an example Jupyter notebook for a new package and add the hooks necessary to run the example with Binder. However, normally the package will not be included in the python path. To do that, one needs a for the package (see binder docs). Once this is done, it is possible to import the package in a notebook running within Binder.

In [1]:
# If mypackage isn't included in the python path, then one would need to add it

#import sys

But if the repository has a binder (repo2docker) will run pip install -e ..

In [2]:
import mypackage
In [3]: