Pip install command timing out waiting for human input

pip
python
git

#1

When running a pip-install with an external VCS URL, it may get stuck when the VCS end is updated and the cached package version therefore mismatches. Pip stops to ask the user for input on what to do next, but this user is non-existent. Then our builds time out.

Example. When running:

if [ -e requirements.txt ]; then pip install -r requirements.txt;else pip install -r requirements.pip;fi

This happens:

Obtaining gitpython from git+git://github.com/nvie/GitPython.git@patches#egg=gitpython (from -r requirements.txt (line 8))
  git clone in /home/ubuntu/virtualenvs/venv-2.7.10/src/gitpython exists with URL git://github.com/gitpython-developers/GitPython.git
  The plan is to install the git repository git://github.com/nvie/GitPython.git
What to do?  (s)witch, (i)gnore, (w)ipe, (b)ackup 
command ((if (file-exists? "requirements.txt") (pip install -r requirements.txt) (pip install -r requirements.pip))) took more than 10 minutes since last output

This can easily be fixed by passing pip install the command line flag --exists-action w (for wipe). I think this is a good default for a build env. Perhaps s (for switch) could work as well.

Could this be updated generically? Or can we override this somewhere at the very least? We’ve tried adding it as a test.pre rule, but this is run at a later stage.


#2