# Local wheel file in requirements.txt

**URL:** https://discourse.jupyter.org/t/local-wheel-file-in-requirements-txt/5768
**Category:** repo help
**Tags:** help-wanted
**Created:** [August 28, 2020, 8:24am UTC](https://discourse.jupyter.org/t/local-wheel-file-in-requirements-txt/5768 "2020-08-28T08:24:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mkhait](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/mkhait/32/313_2.png) [@mkhait](https://discourse.jupyter.org/u/mkhait)
#### Post date: [August 28, 2020, 8:24am UTC](https://discourse.jupyter.org/t/local-wheel-file-in-requirements-txt/5768/1 "2020-08-28T08:24:50Z")

</div>

I am trying to embed installation of a private Python wheel by putting the wheel file into a [github repository](https://github.com/dvoskov/DARTS-workshop) 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?

Thanks!

---

<div class="post-metadata">

### Author: ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)
#### Post date: [August 28, 2020, 11:38am UTC](https://discourse.jupyter.org/t/local-wheel-file-in-requirements-txt/5768/2 "2020-08-28T11:38:11Z")

</div>

> <https://github.com/jupyterhub/repo2docker/blob/0dba6111c6b1f0a5f0208193ca9b16891d4469e6/repo2docker/buildpacks/base.py#L133-L151>

  
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](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).

---

<div class="post-metadata">

### Author: ![mkhait](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/mkhait/32/313_2.png) [@mkhait](https://discourse.jupyter.org/u/mkhait)
#### Post date: [August 28, 2020, 2:04pm UTC](https://discourse.jupyter.org/t/local-wheel-file-in-requirements-txt/5768/3 "2020-08-28T14:04:31Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)
#### Post date: [August 28, 2020, 2:29pm UTC](https://discourse.jupyter.org/t/local-wheel-file-in-requirements-txt/5768/4 "2020-08-28T14:29:29Z")

</div>

Probably a bug report?

---

<div class="post-metadata">

### Author: ![mkhait](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/mkhait/32/313_2.png) [@mkhait](https://discourse.jupyter.org/u/mkhait)
#### Post date: [August 31, 2020, 12:13pm UTC](https://discourse.jupyter.org/t/local-wheel-file-in-requirements-txt/5768/5 "2020-08-31T12:13:51Z")

</div>

Thanks @manics !  
As @betatim pointed out, [there is a special function which detects local requirements and copies them](https://github.com/jupyterhub/repo2docker/issues/948).

A combination of ‘.’ and ‘/’ worked out, so the local dependency is correctly processed for the following line:  
`./darts-0.1.0-cp37-cp37m-linux_x86_64.whl`

Also, it is t[he official way of including a particular file](https://pip.pypa.io/en/stable/reference/pip_install/#example-requirements-file).

Thanks for the help!
