title: pip install local package to target directory
body: <p>I have a Python library that is published to PyPI. Before pushing each new version of the library, I want to test it by upgrading a sample application to use the new version.</p>
  
  <p>The <a href="https://packaging.python.org/tutorials/distributing-packages/#working-in-development-mode" rel="noreferrer">suggested method</a> to do this is to work in "development mode" using the <code>-e</code> (<code>--editable</code>) flag:</p>
  
  <pre><code>$ pip install -e &lt;my package root&gt;
  </code></pre>
  
  <p>And this does indeed install the package into my global environment.</p>
  
  <p>However, my sample program is written for Google App Engine, which requires that <a href="https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27" rel="noreferrer">all third-party libraries be copied</a> into an application-specific folder (<code>./lib</code> in my case). I normally install packages here by using the <code>-t</code> (<code>--target</code>) option to pip:</p>
  
  <pre><code>$ pip install -t lib/ &lt;package&gt;
  </code></pre>
  
  <p>However, it appears that the <code>-e</code> and <code>-t</code> options <a href="https://github.com/pypa/pip/issues/4390" rel="noreferrer">are</a> <a href="https://github.com/pypa/pip/issues/562" rel="noreferrer">not</a> <a href="https://github.com/pypa/pip/issues/3246" rel="noreferrer">compatible</a>, and my attempts to install my local, unpublished library to a specified target folder by using both flags together fail.</p>
  
  <p>How can I test my library package by installing it in a custom directory before publishing?</p>