We recommend you use install dbt using one of three tried and tested methods:
Install Homebrew. Then, run:
brew updatebrew install gitbrew tap dbt-labs/dbtbrew install dbt
Test your installation with
To upgrade dbt, use:
brew updatebrew upgrade dbt
Installing different versions with Homebrew
You can install and use multiple versions of dbt with Homebrew through something called Homebrew "links." To allow installation of another version of dbt, first unlink the current version:
brew unlink dbtbrew install email@example.com link firstname.lastname@example.org
Now, you can use dbt version 0.19.0:
$ dbt --versioninstalled version: 0.19.0
You can switch between versions by linking the one you want to use:
brew unlink email@example.com link dbt
If you want to use a development version of dbt, you can install it as follows:
brew unlink dbtbrew updatebrew install dbt-developmentbrew link dbt-development
dbt is a Python module distributed on pypi, and can be installed via
pip. We recommend using virtual environments when installing with
pip. Some additional steps may be required for Windows and certain flavors of Linux.
The dbt CLI is compatible with Python versions 3.6 and higher. As of v0.15.0, dbt is no longer compatible with Python2.
If you encounter SSL cryptography errors during installation, ensure your local
pip is current (via cryptography.io)
First, we recommend python virtual environments to namespace
pip modules. Here's an example setup:
python3 -m venv dbt-env # create the environmentsource dbt-env/bin/activate # activate the environment
If you install
dbt in a virtual environment, that same virtual environment must be re-activated each time a shell window or session is created.
source ... command in your
$HOME/.zshrc, or whatever rc file your shell draws from. For example, you can add a command like
alias env_dbt='source <...>/bin/activate', where
<...> is substituted for the path to your virtual environment configuration.
pip install dbt
Check your installation with
To upgrade dbt, use:
pip install --upgrade dbt
Additional steps by operating system
These operating systems require additional pre-installation setup. After running whichever commands are relevant to your development environment, return to the instructions above.
sudo apt-get install git libpq-dev python-dev python3-pipsudo apt-get remove python-cffisudo pip install --upgrade cffipip install cryptography~=3.4
sudo yum install redhat-rpm-config gcc libffi-devel \python-devel openssl-devel
- Install Git for Windows and Python version 3.6 or higher for Windows.
- Enable Developer Mode
- Enable Long Paths
Note: We have received reports some community members have experienced problems with Python 3.9 where some dependencies (e.g. cryptography) cannot be properly installed. If you encounter this problem, consider reinstalling or creating a virtual environment with a prior version of Python 3.6.x through Python 3.8.x.
Install from source
Create a dbt virtual environment as detailed in the
pip section above.
Then, install dbt from GitHub source
git clone https://github.com/dbt-labs/dbt-core.gitcd dbtpip install -r requirements.txt