language: python
sudo: false
python:
  - '2.7'
install:
  - pip install coverage phonenumbers regex==2015.11.22 beautifulsoup4 requests websocket-client pytest flake8 termcolor --upgrade
script:
  - flake8 ./
  - python -W default::Warning -m pytest test
branches:
  only:
    - master
    - travis
    - debugging
cache:
  directories:
    - $HOME/virtualenv/python2.7.9
    - $HOME/.cache/pip
before_cache:
  - rm -f $HOME/.cache/pip/log/debug.log

language: python
sudo: false
python:
  - '2.7'
install:
  - pip install coverage phonenumbers regex==2015.11.22 beautifulsoup4 requests websocket-client pytest flake8 termcolor --upgrade
script:
  - flake8 ./
  - python -W default::Warning -m pytest test
branches:
  only:
    - master
    - travis
    - debugging
cache:
  directories:
    - $HOME/virtualenv/python2.7.9
    - $HOME/.cache/pip
before_cache:
  - rm -f $HOME/.cache/pip/log/debug.log
  - rm -f $HOME/.cache/pip/http

Remove pip HTTP cache before caching
Remove pip HTTP cache before caching

I believe this is changed every time the pip lists are updated, no need to cache changes we won't ever use.