title: Prevent pip from installing some dependencies
body: <p>We're developing an <em>AWS Lambda</em> function for Alexa skill in Python and using <code>pip</code> to install the <code>ask-sdk</code> package to our <code>dist/</code> directory:</p>
  
  <pre><code>pip install -t dist/ ask-sdk
  </code></pre>
  
  <p>The trouble is with the <code>-t dist/</code> because <code>pip</code> wants to have all the dependencies there, even if they are installed system-wide.</p>
  
  <p>Now, <code>ask-sdk</code> has a dependency on <code>boto3</code> which pulls in a whole lot of other packages. However the <em>AWS Lambda</em> runtime environment provides <code>boto3</code> and there is no need to package that and its dependencies with our code. I do have <code>boto3</code> installed in the system and <code>import boto3</code> works, so I thought <code>pip</code> should be happy, but because of <code>-t dist/</code> it always installs it.</p>
  
  <p>Can I somehow install just <code>ask-sdk</code> and its dependencies that don't exist in the system, e.g. <code>ask-sdk-core</code>, but not those that are already installed? </p>
  
  <p>One way is to list all the modules and use <code>pip --no-deps</code> but that means a constantly keeping track of the dependencies manually, we would like to avoid that.</p>
  
  <p>Somehow I would like to tell <code>pip</code>: if the package is already installed, even if not in <code>-t dist/</code> don't put a copy in <code>dist/</code>.</p>
  
  <p>Is that possible?</p>
  
  <p>Thanks!</p>