dbt 返回的输出
(base) aavesh@localhost ~ % which dbt
/Users/aavesh/opt/anaconda3/bin/dbt
然后 conda remove 、 pip uninstall 和 pip 3 uninstall 全部失败
(base) aavesh@localhost ~ % conda remove dbt
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are missing from the target environment:
- dbt
(base) aavesh@localhost ~ % pip uninstall dbt
WARNING: Skipping dbt as it is not installed.
(base) aavesh@localhost ~ % pip3 uninstall dbt
WARNING: Skipping dbt as it is not installed.
(base) aavesh@localhost ~ % which dbt
/Users/aavesh/opt/anaconda3/bin/dbt
dbt init 也因为错误而无法工作
(base) aavesh@localhost ~ % dbt init
Error: unknown command "init" for "dbt"
Run 'dbt --help' for usage.
使用以下 3 个命令并卸载 conda 完全为我解决了这个问题,这有点麻烦,但对于像我这样时间紧迫且从未使用过 conda 软件包的人来说可能是最好的解决方案。
conda activate
conda init --reverse --all
rm -rf anaconda3