Installing dbt Core
dbt Core is the free, open-source version of dbt. You install it on your computer and run it from the terminal. This topic walks you through every installation step so you have a working dbt setup before creating your first project.
What You Need Before Installing
dbt Core requires two things already on your computer:
Python 3.8 or Higher
dbt is a Python package. You must have Python installed. Open your terminal and type python --version or python3 --version. If you see a version number of 3.8 or above, you are ready. If not, download Python from python.org.
pip (Python Package Installer)
pip comes with Python automatically. Verify it exists by typing pip --version in the terminal.
Terminal check: $ python3 --version Python 3.11.5 ✓ $ pip --version pip 23.2.1 from /usr/lib/python3.11 ✓
Understanding dbt Adapters
dbt Core does not connect to any specific warehouse by itself. It needs an adapter — a small plugin that speaks the language of your particular warehouse. You install dbt Core together with your adapter in one command.
Adapter Package Name Works With ------------------------ ---------- dbt-core + dbt-postgres PostgreSQL dbt-core + dbt-snowflake Snowflake dbt-core + dbt-bigquery Google BigQuery dbt-core + dbt-redshift Amazon Redshift dbt-core + dbt-duckdb DuckDB (local, great for learning) dbt-core + dbt-databricks Databricks
If you are learning and do not have access to a cloud warehouse, install dbt-duckdb. DuckDB runs entirely on your laptop with no account or credentials required.
Installation Using pip
The recommended approach uses a Python virtual environment. A virtual environment keeps dbt and its dependencies isolated from other Python projects on your computer. This prevents version conflicts.
Step 1 – Create a Virtual Environment
# MacOS / Linux python3 -m venv dbt-env # Windows python -m venv dbt-env
Step 2 – Activate the Virtual Environment
# MacOS / Linux source dbt-env/bin/activate # Windows (Command Prompt) dbt-env\Scripts\activate.bat # Windows (PowerShell) dbt-env\Scripts\Activate.ps1
After activation, your terminal prompt shows the environment name in parentheses like (dbt-env) $.
Step 3 – Install dbt with Your Adapter
# For DuckDB (easiest for beginners) pip install dbt-duckdb # For Snowflake pip install dbt-snowflake # For BigQuery pip install dbt-bigquery # For PostgreSQL pip install dbt-postgres # For Redshift pip install dbt-redshift
pip downloads dbt-core and your chosen adapter together. This takes one to three minutes depending on your internet speed.
Step 4 – Verify the Installation
dbt --version
You should see output like:
Core: - installed: 1.8.3 - latest: 1.8.3 - Up to date! Plugins: - duckdb: 1.8.1 - Up to date!
Installation Using pipx (Alternative)
pipx installs Python CLI tools in isolated environments automatically. It is a good choice if you do not want to manage virtual environments yourself.
# Install pipx first (one time) pip install pipx pipx ensurepath # Then install dbt pipx install dbt-duckdb
Installation on Windows Using Chocolatey
Windows users who use Chocolatey (a Windows package manager) can install Python and dbt this way:
choco install python pip install dbt-duckdb
Troubleshooting Common Errors
Error: "dbt: command not found"
Your virtual environment is not activated. Run the activate command from Step 2 again. If you open a new terminal window, always activate the environment first.
Error: "pip: command not found"
Try replacing pip with pip3 in the command. On some systems the Python 3 version of pip uses the longer name.
Error on BigQuery: "google-cloud packages missing"
BigQuery needs extra packages. Run pip install dbt-bigquery[bigquery] with the brackets included.
Error: permissions denied on macOS
Never use sudo pip install. Instead, create a virtual environment as described above and install inside it. The virtual environment folder belongs to your user account and never requires admin permissions.
Upgrading dbt
dbt releases new versions frequently. Upgrade your installation with:
pip install --upgrade dbt-duckdb
This upgrades both dbt-core and the adapter to their latest compatible versions.
What Gets Installed
After installation, dbt adds several command-line tools to your environment:
dbt run – Execute your models dbt test – Run data quality tests dbt docs – Generate documentation dbt compile – Compile Jinja but don't run dbt seed – Load CSV files into tables dbt snapshot – Run snapshot models dbt debug – Test your warehouse connection dbt deps – Install dbt packages dbt clean – Delete target/ folder dbt build – Run + test + seed + snapshot together
Next Step After Installation
Once dbt --version shows a valid version, you are ready to create your first project using dbt init. The next topic covers the full project setup process step by step.
