# Missing python3.6 on xcode9.4

**URL:** <https://travis-ci.community/t/missing-python3-6-on-xcode9-4/6588>\
**Category:** macOS\
**Created:** [December 21, 2019, 10:55pm UTC](https://travis-ci.community/t/missing-python3-6-on-xcode9-4/6588 "2019-12-21T22:55:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Borda](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/borda/32/3471_2.png) [@Borda](https://travis-ci.community/u/Borda)\
**Post date:** [December 21, 2019, 10:55pm UTC](https://travis-ci.community/t/missing-python3-6-on-xcode9-4/6588/1 "2019-12-21T22:55:15Z")

</div>

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](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](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://travis-ci.org/Borda/pytorch-lightning/jobs/624751287)

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [December 22, 2019, 12:15am UTC](https://travis-ci.community/t/missing-python3-6-on-xcode9-4/6588/2 "2019-12-22T00:15:55Z")

</div>

[https://blog.travis-ci.com/2019-08-07-extensive-python-testing-on-travis-ci](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](https://travis-ci.org/native-api/test_travis/builds/628227804).

The official documentation is [https://docs.travis-ci.com/user/reference/osx/](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

- Consider using [https://github.com/matthew-brett/multibuild](https://github.com/matthew-brett/multibuild) which has the functionality to install prebuilt Python OSX releases from the official site.

---

<div class="post-metadata">

**Author:** ![Borda](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/borda/32/3471_2.png) [@Borda](https://travis-ci.community/u/Borda)\
**Post date:** [December 22, 2019, 9:16am UTC](https://travis-ci.community/t/missing-python3-6-on-xcode9-4/6588/3 "2019-12-22T09:16:32Z")

</div>

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
  addons:
    homebrew:
      # update: true
      packages: python3.6
  before_install:
    - pip3 install virtualenv
    - virtualenv -p python3 ~/venv
    - source ~/venv/bin/activate
```

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [December 22, 2019, 9:30am UTC](https://travis-ci.community/t/missing-python3-6-on-xcode9-4/6588/4 "2019-12-22T09:30:45Z")

</div>

[https://travis-ci.org/Borda/pytorch-lightning/jobs/626454896#L86](https://travis-ci.org/Borda/pytorch-lightning/jobs/626454896#L86)

---

<div class="post-metadata">

**Author:** ![Borda](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/borda/32/3471_2.png) [@Borda](https://travis-ci.community/u/Borda)\
**Post date:** [December 22, 2019, 10:55am UTC](https://travis-ci.community/t/missing-python3-6-on-xcode9-4/6588/5 "2019-12-22T10:55:24Z")

</div>

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](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.
```

---

<div class="post-metadata">

**Author:** ![Borda](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/borda/32/3471_2.png) [@Borda](https://travis-ci.community/u/Borda)\
**Post date:** [December 22, 2019, 11:29pm UTC](https://travis-ci.community/t/missing-python3-6-on-xcode9-4/6588/6 "2019-12-22T23:29:59Z")

</div>

similar to 🙄:

- [Python versions (for matrix build) not available for macOS](https://travis-ci.community/t/python-versions-for-matrix-build-not-available-for-macos/3351)
- [https://github.com/travis-ci/travis-ci/issues/9744](https://github.com/travis-ci/travis-ci/issues/9744)
- [https://github.com/travis-ci/travis-ci/issues/9815#issuecomment-401590901](https://github.com/travis-ci/travis-ci/issues/9815#issuecomment-401590901)

---

<div class="post-metadata">

**Author:** ![Borda](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/borda/32/3471_2.png) [@Borda](https://travis-ci.community/u/Borda)\
**Post date:** [December 26, 2019, 10:46pm UTC](https://travis-ci.community/t/missing-python3-6-on-xcode9-4/6588/7 "2019-12-26T22:46:43Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [December 27, 2019, 3:49am UTC](https://travis-ci.community/t/missing-python3-6-on-xcode9-4/6588/8 "2019-12-27T03:49:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Borda](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/borda/32/3471_2.png) [@Borda](https://travis-ci.community/u/Borda)\
**Post date:** [December 27, 2019, 8:18am UTC](https://travis-ci.community/t/missing-python3-6-on-xcode9-4/6588/9 "2019-12-27T08:18:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![muschellij2](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/muschellij2/32/2532_2.png) [@muschellij2](https://travis-ci.community/u/muschellij2)\
**Post date:** [February 3, 2020, 9:45pm UTC](https://travis-ci.community/t/missing-python3-6-on-xcode9-4/6588/10 "2020-02-03T21:45:31Z")

</div>

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

 ![Screen Shot 2020-02-03 at 4.44.30 PM](https://us1.discourse-cdn.com/flex015/uploads/travis_ci/original/2X/0/088b8a3219b303a777c6bac66751930e9242ddec.png)
