Local wheel file in requirements.txt

I am trying to embed installation of a private Python wheel by putting the wheel file into a github repository root and specifying its name in requirements.txt. In principle, pip understands such syntax on a regular machine, but binder seems to fail to find the wheel file during build:

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: ‘/home/jovyan/darts-0.1.0-cp37-cp37m-linux_x86_64.whl’

All repo content is meant to be copied to the home directory during binder build, so the path appears to be correct, but the file isn`t there. What could be the problem and how to solve it?


1 Like

It looks like requirements.txt is copied and installed before the other files in the repository to improve caching of builds- the idea is that the content of the repository such as notebooks is much more likely to change than the environment, so by separating the steps you can take advantage of Docker layer build caching.

Can you open an issue on https://github.com/jupyterhub/repo2docker for further discussion and cross link this thread?

(As an aside, I figured this out by extracting the intermediate Dockerfile created by repo2docker from the linked repository).

1 Like

Thanks @manics, it indeed explains why binder does not see the wheel file.
I`m not sure what type of issue do you want me to open: feature request or bug report?

Probably a bug report?

Thanks @manics !
As @betatim pointed out, there is a special function which detects local requirements and copies them.

A combination of ‘.’ and ‘/’ worked out, so the local dependency is correctly processed for the following line:

Also, it is the official way of including a particular file.

Thanks for the help!