Skip to content

Instantly share code, notes, and snippets.

@theptrk
Last active June 23, 2020 16:13
Show Gist options
  • Save theptrk/087beb7e0e99b6442b39d483063d99af to your computer and use it in GitHub Desktop.
Save theptrk/087beb7e0e99b6442b39d483063d99af to your computer and use it in GitHub Desktop.
pyenv - get available versions for installation

First check the python downloads page to view the current releases

$ open https://www.python.org/downloads/

This produces the list of ALL available pyenv versions

$ pyenv install --list

  ...
  pypy3-dev
  pypy3-2.3.1-src
  pypy3-2.3.1
  pypy3-2.4.0-src
  pypy3-2.4.0
  pypy3.3-5.2-alpha1-src
  pypy3.3-5.2-alpha1
  pypy3.3-5.5-alpha-src
  pypy3.3-5.5-alpha
  pypy3.5-c-jit-latest
  pypy3.5-5.7-beta-src
  pypy3.5-5.7-beta
  pypy3.5-5.7.1-beta-src
  pypy3.5-5.7.1-beta
  pypy3.5-5.8.0-src
  pypy3.5-5.8.0
  pypy3.5-5.9.0-src
  pypy3.5-5.9.0
  pypy3.5-5.10.0-src
  pypy3.5-5.10.0
  pypy3.5-5.10.1-src
  pypy3.5-5.10.1
  pypy3.5-6.0.0-src
  pypy3.5-6.0.0
  pypy3.5-7.0.0-src
  pypy3.5-7.0.0
  pypy3.6-7.0.0-src
  pypy3.6-7.0.0
  pypy3.6-7.1.0-src
  pypy3.6-7.1.0
  pypy3.6-7.1.1-src
  pypy3.6-7.1.1
  pypy3.6-7.2.0-src
  pypy3.6-7.2.0
  pypy3.6-7.3.0-src
  pypy3.6-7.3.0
  pyston-0.5.1
  pyston-0.6.0
  pyston-0.6.1
  stackless-dev
  stackless-2.7-dev
  stackless-2.7.2
  stackless-2.7.3
  stackless-2.7.4
  stackless-2.7.5
  stackless-2.7.6
  stackless-2.7.7
  stackless-2.7.8
  stackless-2.7.9
  stackless-2.7.10
  stackless-2.7.11
  stackless-2.7.12
  stackless-2.7.14
  stackless-3.2.2
  stackless-3.2.5
  stackless-3.3.5
  stackless-3.3.7
  stackless-3.4-dev
  stackless-3.4.1
  stackless-3.4.2
  stackless-3.4.7
  stackless-3.5.4

So that can be overwhelming.

Instead we can filter to see only python official distributions

pyenv install --list|awk '$1 ~ /^3/'

  ...
  3.5.6
  3.5.7
  3.5.8
  3.5.9
  3.6.0
  3.6-dev
  3.6.1
  3.6.2
  3.6.3
  3.6.4
  3.6.5
  3.6.6
  3.6.7
  3.6.8
  3.6.9
  3.6.10
  3.7.0
  3.7-dev
  3.7.1
  3.7.2
  3.7.3
  3.7.4
  3.7.5
  3.7.6
  3.7.7
  3.8.0
  3.8-dev
  3.8.1
  3.8.2
  3.9.0a5
  3.9-dev

That is better but we still dont need every distribution

Here we filter the 10 most recent releases

pyenv install --list|awk '$1 ~ /^3/'|tail -n 10

  3.7.4
  3.7.5
  3.7.6
  3.7.7
  3.8.0
  3.8-dev
  3.8.1
  3.8.2
  3.9.0a5
  3.9-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment