Installing a specific version of DBT (using Python / PIP)

Here is a script that I include in my dbt projects to help setup the desired version of dbt (note that your python might just be python).


python3 -m pip install --upgrade pip setuptools wheel --no-cache-dir
python3 -m pip install --upgrade dbt-core==${DBT_VERSION}
dbt --version

I store this is ./scripts/, and then can run it with


Or, if I need to revert to an older version.

DBT_VERSION=1.4.4 ./scripts/

The output should look similar to

dbtstuff (main)$ dbt --version
  - installed: 1.4.4
  - latest:    1.5.3 - Update available!

  Your version of dbt-core is out of date!
  You can find instructions for upgrading here: