# What's a good way to get python 3.7+ (with pip) onto a non-python project?

**URL:** <https://travis-ci.community/t/whats-a-good-way-to-get-python-3-7-with-pip-onto-a-non-python-project/11209>\
**Category:** Travis CI Discussions & Feedback\
**Tags:** python\
**Created:** [February 24, 2021, 2:07pm UTC](https://travis-ci.community/t/whats-a-good-way-to-get-python-3-7-with-pip-onto-a-non-python-project/11209 "2021-02-24T14:07:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [February 25, 2021, 12:31am UTC](https://travis-ci.community/t/whats-a-good-way-to-get-python-3-7-with-pip-onto-a-non-python-project/11209/2 "2021-02-25T00:31:24Z")

</div>

- Use `dist: focal` which [comes with `3.8.2`](https://packages.ubuntu.com/focal/python3); or
- install the necessary version with `pyenv` and cache the result

> [@Specifying Python version on build that uses multiple languages](https://travis-ci.community/t/specifying-python-version-on-build-that-uses-multiple-languages/9054/4):
>
> Note that this is going to stop working ifwhen Travis changes their storage location and/or schema. A more sustainable solution would be to install the extra version from source with pyenv and cache the result. In any case, as you’ve correctly guessed, you need to install any language software yourself whenever language: is not it and it’s not preinstalled.

> [@\`pyenv global 3.8.0\` does not change the python version on mac os](https://travis-ci.community/t/pyenv-global-3-8-0-does-not-change-the-python-version-on-mac-os/10146/4):
>
> Add eval "$(pyenv init -)" (note the quotes) to your script to add Pyenv shims directory to PATH. You likely want to add /Users/travis/.pyenv/versions to cache and do pyenv install -s to avoid building Python from source anew every time.

---

_[View the full topic](https://travis-ci.community/t/whats-a-good-way-to-get-python-3-7-with-pip-onto-a-non-python-project/11209)._
