DBT installation guide:
The dbt package will be installed into a Python virtual environment. This allows us to install different versions of dbt (or Python) on your computer and check if the project still works or where it breaks. Therefore, whenever installing a new version of dbt, create a new virtual environment and install the dbt package in it.
I used Ubuntu 22.04 to install dbt-core version 1.8 and virtualenv. First, we will install virtualenv to have a clean, isolated environment.
Install Virtualenv
sudo apt install virtualenv
Create a Virtual Environment
python3.10 -m venv vm_dbt_package
Log into Your Virtual Environment
First, enter your virtual environment directory
cd vm_dbt_package
Then activate the virtual environment with the command
source bin/activate
Upgrade Pip in Your Virtual Environment
pip install --upgrade pip
It might be necessary to install or upgrade your setuptools package as well
pip install --upgrade setuptools
Install dbt-core and DuckDB as the database adapter
python -m pip install dbt-core dbt-duckdb
Check the dbt version
dbt --version
After the installation of dbt, you can check which packages have been installed in your virtual environment
pip list
You should now see several dbt packages and other Python packages.