Python 3.6 is the default Python when language: python.
But when not language: python, Python 3 can not be used by default.
There is pip (/usr/bin/pip), but not pip3.
We can use pyenv global 3.7.1 to activate Python 3.7.1 and we can use pip3.
Please do it by default, or please document it in xenial environment at least.
Python 2 will be EOL in 6 months later. pip3 should be recommended for installing Python tools.
Without language: python, Travis has whatever Python versions are provided by the distro.
For Xenial, these are 2.7.12 and 3.5.1, for Bionic – 2.7.15 and 3.6.7.
When you pyenv install another version, pyenv makes a completely new installation that is not Travis-provided – as such, you are the one responsible for managing it.
You can use
addons:
apt:
packages:
- python3-pip
to install pip3. But it would belong to the distro-provided python3 – would that really be useful for you?
Then I fail to see what you want. You can already do all you need.
Do you want 3.7.1 to be the default python/python3 or something?
Documentation-wise, you can submit improvements using the “Improve this page on Github” links on top of doc pages.
That said, I would wholeheartedly support the latter. Available Python versions and how to use them (export PATH="/opt/python/3.7.1/bin:$PATH"? Would never guess that. Do I need to do the same for all the other versions, or just some of them?) are completely undocumented, see https://travis-ci.community/t/document-supported-pypy-versions .
Then you know what to do.The ways are already there, you only need to document them. If Travis staff has any opinions on what is and isn’t supported, you can sort them out in the process of discussing a PR.