Install a python version using:
$ pyenv install 3.8.9
Installed Python-3.8.9 to /Users/robino/.pyenv/versions/3.8.9
List the python versions now available:
$ pyenv versions
* system
3.8.2
3.8.9
A week goes by and I forget where it is installed. Now suppose I want to get the executable path for 3.8.9 version. The following do not work:
$ pyenv which 3.8.9
pyenv: 3.8.9: command not found
$ pyenv which python 3.8.9
(gives path to system python)
$ pyenv which python-3.8.9
pyenv: python-3.8.9: command not found
$ pyenv which Python-3.8.9
pyenv: Python-3.8.9: command not found
A workaround I found was to set the python version, check, then set it back to system:
$ pyenv local 3.8.9
$ pyenv which python
/Users/robino/.pyenv/versions/3.8.9/bin/python
$ pyenv local --unset
However this is a suboptimal solution as it required that no local is previous set.
What is the correct command to print out the python executable path for a currently not used version, using pyenv?