With ruby-install
, to install the latest stable ruby version, one needs only ruby-install ruby
.
However, with pyenv
one seems to need to do something ridiculous like pyenv install $(pyenv install --list | sed 's/^ //' | grep '^\d' | grep --invert-match 'dev\|a\|b' | tail -1)
.
Is there a better way to do this? Why do python tools seem to always make installing the latest version such an obtuse process compared to ruby (gem update
vs pip list --outdated | awk '!/Could not|ignored/ { print $1 }' | xargs pip install --upgrade
)? I hope I’m the one missing something, but I can never find easy solutions for this online.
You can use either pyenv -v or pyenv --version to get the version of pyenv itself. Version comes up as the first command.
To do that, visit https://www.python.org/downloads/ on your Mac; it detects your operating system automatically and shows a big button for downloading the latest version of Python installer on your Mac. If it doesn't, click the macOS link and choose the latest Python release.
Install that version using "make install". Install all other versions using "make altinstall". For example, if you want to install Python 2.5, 2.6 and 3.0 with 2.6 being the primary version, you would execute "make install" in your 2.6 build directory and "make altinstall" in the others.
Try https://github.com/momo-lab/pyenv-install-latest
Installation...
git clone https://github.com/momo-lab/pyenv-install-latest.git "$(pyenv root)"/plugins/pyenv-install-latest
Latest 2.7 build of python...
pyenv install-latest 2.7
and for python 3...
pyenv install-latest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With