Missing python3.6 on xcode9.4

Just recently I found an issue with missing python 3.6 on default xcode 9.4 image even it should be there according to the docs - https://blog.travis-ci.com/2019-08-07-extensive-python-testing-on-travis-ci

Sample failing build is here: https://travis-ci.org/Borda/pytorch-lightning/jobs/626454896
and message:

$ tox --sitepackages
GLOB sdist-make: /Users/travis/build/Borda/pytorch-lightning/setup.py
py36 create: /Users/travis/build/Borda/pytorch-lightning/.tox/py36
ERROR: InterpreterNotFound: python3.6

and about a week ago it was fine… https://travis-ci.org/Borda/pytorch-lightning/jobs/624751287

https://blog.travis-ci.com/2019-08-07-extensive-python-testing-on-travis-ci is a blog entry. The facts given there were probably true at the time of writing but cannot be guaranteed to stay true. My test shows 2.7.17 and 3.7.5 atm.

The official documentation is https://docs.travis-ci.com/user/reference/osx/ and it doesn’t guarantee any specific Python version. All it guarantees is pyenv Homebrew package.

  • You are pretty safe to rely on some version of Python 2 and Python 3 from Homebrew to be present because it’s a widely used dependency. But not on its version.

  • You can use pyenv but it builds versions from source which takes time

    • you can add the resulting installed subtree to Travis cache though but will need to add the necessary logic to detect a cached version and avoid rebuilding (hint: pyenv install -s)
  • Consider using https://github.com/matthew-brett/multibuild which has the functionality to install prebuilt Python OSX releases from the official site.

    • Note that such an installation conflicts with Homebrew’s python formula so you need to run all brew commands you need before installing it.

ok, so do you have any idea why adding python 3.6 via addon didn’t work?

- os: osx
  osx_image: xcode9.4
  language: generic
  env: TOXENV=py36
      # update: true
      packages: python3.6
    - pip3 install virtualenv
    - virtualenv -p python3 ~/venv
    - source ~/venv/bin/activate


I see, do you have an advice how to properly add Python 3.6?
I have tried to set it up bit then it does not download it…

- os: osx
  osx_image: xcode9.4
  python: 3.6
  env: TOXENV=py36

see https://travis-ci.org/Borda/BIRL/jobs/628424065

travis_0.01s0.01s3.6 is not installed; attempting download
Downloading archive: https://storage.googleapis.com/travis-ci-language- 
archives/python/binaries/osx/10.13/x86_64/python-3.6.tar.bz20.19s$ curl -sSf --retry 5 -o python-3.6.tar.bz2 ${archive_url}
curl: (22) The requested URL returned error: 404
Unable to download 3.6 archive. The archive may not exist. Please consider a different version.

similar to :roll_eyes::

Well, but the point is different; obviously, the image changed xcode9.4 even image should be frozen…
Also, the env variable DISPLAY is not passed on properly as other tests are freezing because of a suppressed input waiting…

There’s no guarantee in the docs that “image should be frozen”. Previously, Travis staff did say that “images were frozen” on a number of occasions and that caused many complaints because they wouldn’t fix bugs in them.

well, on the other hand, it is like changes something in released SW. now my case is that I debug it for a particular version and suddenly it fails without any external (mine) change… this is very inconvenient behaviour… I guess they want to make a change in 9.4, then they should release 9.5

Just saw this on https://docs.travis-ci.com/user/languages/python/:

1 Like