Try this the it should work.
pyenv local 2.7.18Also reason why
global
switch don't work.echo $PATHIf in output on command there is a file named
home/.python-version
delete this folder,then global switch should work again.