title: pip-tools doesn't install dependencies to activated virtualenv
body: <p>I wish to separate my requirement files into development (requirements-dev.txt) and production (requirements.txt) using pip-tools.</p>
  <p>I have installed pip-tools using pipx as I want it to be globally available but isolated. However, doing so causes my dependencies to be installed by pip-tools within the virtual environment of pip-tools itself, rather than the activated virtual environment.</p>
  <p>I don't know if it is a factor, but I am also using pyenv to manage my python versions, but only have one (non-system) version installed globally.</p>
  <p>Given my environment (i.e. pip-tools installed with pipx, python managed by pyenv), how do I get <code>pip-sync</code> to install the dependencies within the <strong>activated</strong> virtual environment?</p>
  <p>Here is my workflow to reproduce this:</p>
  <pre><code># Install pip-tools globally
  pipx install pip-tools
  
  # Create a virtual environment and activate it
  python -m venv venv
  source venv/bin/activate
  
  # Create prod/dev requirement input files (see below for content)
  
  # Autogenerate requirement files
  pip-compile requirements.in
  pip-compile requirements-dev.in
  
  # Install all dependencies
  pip-sync requirements.txt requirements-dev.txt
  
  # Check what is installed (outputs nothing)
  pip freeze
  
  # Check what is installed in pip-tools virtual env
  ~/.local/pipx/venvs/pip-tools/bin/python -m pip freeze
  
  # output shows flask, pytest, and their dependencies
  
  </code></pre>
  <p>Production dependency file</p>
  <pre><code># requirements.in
  flask
  </code></pre>
  <p>Development dependency file</p>
  <pre><code># requirements-dev.in
  -c requirements.txt
  pytest
  </code></pre>