title: Installing dependencies of a local dependency with pipenv
body: <h3>Background</h3>
  
  <p>We have project with the following high-level directory structure*</p>
  
  <pre><code>./datascience/
  ├── core
  │   └── setup.py
  ├── notebooks
  │   └── Pipfile
  └── web
      └── Pipfile
  </code></pre>
  
  <p><sup>*Excluded all the irrelevant files and directories for brevity.</sup></p>
  
  <p>The <code>core</code> package is a library. It's a dependency of both the <code>notebooks</code> and <code>web</code> applications. </p>
  
  <p>The <code>core</code> package, <a href="https://pipenv.readthedocs.io/en/latest/advanced/#pipfile-vs-setup-py" rel="noreferrer">being a library</a>, has its dependencies specified in <code>setup.py</code></p>
  
  <pre><code>import setuptools
  
  setuptools.setup(
      install_requires=[
          'some-dependency',
          'another-dependency'
      ]
  )
  </code></pre>
  
  <p>The <code>web</code> and <code>notebooks</code> applications are using <a href="https://pipenv.readthedocs.io" rel="noreferrer">pipenv</a> for dependency management. Their dependencies are specified in a <code>Pipfile</code>.</p>
  
  <p>For example, here's how the <code>web</code> dependencies are specified in <code>web/Pipfile</code>: </p>
  
  <pre><code>[packages]
  datascience-core = {path = "./../core"}
  flask = "~= 1.0"
  </code></pre>
  
  <p>Notice how the <code>core</code> dependency is a local dependency, hence the relative path.</p>
  
  <h3>Problem</h3>
  
  <p>Doing a <code>pipenv install</code> from inside the the <code>web</code> or <code>notebooks</code> directory, does not install the dependencies of the <code>core</code> library as I expected!</p>
  
  <p>I also tried using a <code>Pipfile</code> for <code>core</code>, hoping that pipenv would pick it up in its graph and download all the nested dependencies. But it doesn't. </p>
  
  <p>How can dependencies of the <code>core</code> app be installed automatically when pipenv is installing dependencies for the <code>web</code> or <code>notebooks</code> app?</p>