Created 2024-12-30T10:01:50Z
Updated 2024-12-30T12:26:28Z
Type Blog
Status In Progress

I have an older version of DBT installed and I want to install the latest version which supports Unit Testing.

It would appear that I’m unable to simply update DBT and now my DBT setup isn’t working. I now want to remove all of the current DBT and related config then install the latest version. This may also include removing and reinstalling the latest Python, which was initially installed via Brew.

Installing Python

With reference to mac.install.guide/python/brew

python --version
Python 3.13.1
pip --version
pip 24.3.1 from /opt/homebrew/lib/python3.13/site-package/pip (python 3.13)

Installing DBT

With reference to https://docs.getdbt/docs/core/pip-install

First run in dbt environment

dbt-env

Then check the version

dbt --version
zsh: Command not found: dbt

Now install dbt core and required adapters

python -m pip install \
dbt-core \
dbt-postgres \
dbt-bigquery

Check version again

dbt --version

Results in an error ending with

ModuleNotFoundError: No module named 'dbt.adapters.factory'

Found post http://materialize.com/changelog/2024-05-27-dbt-1.8.0/

pip install --force-reinstall dbt-adapters

Checking DBT Version

dbt --version
Core:
 - installed: 1.9.1
 - latest: 1.9.1 - Up to date!