After upgrading my machine from macOS Mojave to macOS Monterey, asdf is not setting the python version correctly.
The base information on my installation are the following:
asdf info
OS:
Darwin MacBook-Pro.local 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64 x86_64
SHELL:
zsh 5.8 (x86_64-apple-darwin21.0)
ASDF VERSION:
v0.9.0
ASDF ENVIRONMENT VARIABLES:
ASDF_DIR=/usr/local/opt/asdf/libexec
ASDF INSTALLED PLUGINS:
golang https://github.com/kennyp/asdf-golang.git master 4aed736
helm https://github.com/Antiarchitect/asdf-helm.git master 87eef5a
nodejs https://github.com/asdf-vm/asdf-nodejs.git master ed34355
pnpm git@github.com:jonathanmorley/asdf-pnpm.git master 2349db8
python https://github.com/danhper/asdf-python.git master 57a4d72
asdf is picking up correctly the version of python it is supposed to use:
asdf current python
python 3.9.1 /Users/me/code/.tool-versions
However, when I test the python version, the system installed python is run:
python --version
Python 2.7.17
I tried to reinstall asdf several times without much success. When I try to reinstall the python plugin, it tells me that it is already installed:
asdf plugin-add python
Plugin named python already added
When I try to re-install this specific version of python, it tells me it is already installed:
asdf install python 3.9.1
python 3.9.1 is already installed
It is just as if asdf was not triggered when I get into the folder. Did anyone have the same issue?
The problem got fixed by removing anything related to asdf from my home and reinstalling all plugins and all versions:
rm -rf ~/.asdf
asdf plugin add python https://github.com/danhper/asdf-python.git
asdf install python 3.9.1