升级到 macOS Monterey 后 asdf 不工作

asdf not working after upgrade to macOS Monterey

将我的机器从 macOS Mojave 升级到 macOS Monterey 后,asdf 没有正确设置 python 版本。

我安装的基本信息如下:

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 正在正确获取它应该使用的 python 版本:

asdf current python
python          3.9.1           /Users/me/code/.tool-versions

但是我测试python版本时,安装的系统python是运行:

python --version
Python 2.7.17

我多次尝试重新安装 asdf,但都没有成功。 当我尝试重新安装 python 插件时,它告诉我它已经安装:

asdf plugin-add python
Plugin named python already added

当我尝试重新安装此特定版本的 python 时,它告诉我它已经安装:

asdf install python 3.9.1
python 3.9.1 is already installed

进入文件夹就好像没有触发asdf一样。有人遇到同样的问题吗?

通过从我的家中删除与 asdf 相关的所有内容并重新安装所有插件和所有版本,问题得到解决:

rm -rf ~/.asdf
asdf plugin add python https://github.com/danhper/asdf-python.git
asdf install python 3.9.1