Python – Travis-ci with tox fails on python 2.6, python 3.3, and pypy

Travis-ci with tox fails on python 2.6, python 3.3, and pypy… here is a solution to the problem.

Travis-ci with tox fails on python 2.6, python 3.3, and pypy

I just submitted a seemingly uninteresting commit that updated the release notes and settings for pypi. The travis-ci build fails, but tox: is run with py26, py33, and pypy

https://travis-ci.org/Turbo87/aerofiles

1.13s$ tox -e $TOX_ENV -- --cov aerofiles --cov-report term-missing
py26 create: /home/travis/build/Turbo87/aerofiles/.tox/py26
ERROR: InterpreterNotFound: python2.6

I haven’t made any changes to travis.yml, tox has been fixed in version 1.7.2:

language: python
python: 2.7

sudo: false

env:
  - TOX_ENV=py26
  - TOX_ENV=py27
  - TOX_ENV=py33
  - TOX_ENV=py34
  - TOX_ENV=pypy

install:
  # Install tox and flake8 style checker    
  - pip install tox==1.7.2 flake8==2.1.0

script:
  # Run the library through flake8
  - flake8 --exclude=".git,docs" --ignore=E501 .

# Run the unit test suite
  - tox -e $TOX_ENV --  --cov aerofiles --cov-report term-missing

It would be great if someone could help. I’m still new to Travis-Ci (and ToX), which is still a black box.

Solution

A few weeks ago, I was forced to change all my .travis.yml because of this issue. See also my commit

env:
  - TOXENV=py27
  - TOXENV=py34

Write

matrix:
  include:
  - python: "2.7"
    env: TOXENV=py27
  - python: "3.4"
    env: TOXENV=py34

Related Problems and Solutions