Finding versions of Python that are available for "pyenv install"
Asked Answered
D

1

153

I want to know what Python versions I could install using the pyenv install command. pyenv versions lists only installed versions and does not appear to have an option to list available versions.

How can I find out what versions of Python I can install with pyenv install?

Donatus answered 27/9, 2019 at 16:39 Comment(2)
Why I asked and answered this: I'm a Ruby programmer who uses rvm. In rvm, listing available versions is done with a variation of the command that lists installed versions, rather than the command that installs new versions. There's nothing illogical about either choice, but my long experience with rvm made me blind to the idea that the "install" command was the place to look. Searches of either google or SO didn't help; this question/answer would have saved me some time.Donatus
this is what I call "seeding Google". I often write the answers I wish I could find so that next time I need them they'll be here. It's really satisfying when you get to the bottom of a great answer and discover that you wrote it years ago at 4am.Publius
D
233

pyenv accepts a switch to the install command to list available versions: --list, or -l for short:

$ pyenv install -l
Available versions:
  2.1.3
  2.2.3
  2.3.7
  2.4.0
  2.4.1
  2.4.2
...

Before running pyenv install -l, you may need to update pyenv as described here. Otherwise the list may not include the latest versions (thank you @csatt1).

Donatus answered 27/9, 2019 at 16:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.