How many types of Python are in your Window 10? I had 5 types. collects "likes", but the very disappointing thing is that there is a paragraph "Which Python did you leave after all?". This description gives the impression that "it is abnormal that 5 Pythons are installed".
** True Pythonista has all Python installed in case something goes wrong! !! ** **
So, you can install all Python (398 types as of March 9, 2020) with the following command! In addition to this, for OS and HomeBrew Python 2 and 3 are installed, so ** 401 types **!
pyenv install -l | tail -n +1 | cut -b 3- | xargs -n 1 pyenv install -f
In addition, if you talk seriously ...
In normal development work, not all projects use the latest version of Python, so you will always need a major version (past 3 versions) that is supported. It is better to install it in advance when the machine is supplied.
# 3.6.x latest version
pyenv install -l | tail -n +1 | cut -b 3- | egrep '^3.6.\d+$' | tail -1 | xargs -n 1 pyenv install -f
# 3.7.x latest version
pyenv install -l | tail -n +1 | cut -b 3- | egrep '^3.7.\d+$' | tail -1 | xargs -n 1 pyenv install -f
# 3.8.x latest version
pyenv install -l | tail -n +1 | cut -b 3- | egrep '^3.8.\d+$' | tail -1 | xargs -n 1 pyenv install -f
If you install 3 versions, 1 (OS) + 2 (HomeBrew) + 3 (pyenv) = 6 types.
Recommended Posts