Installing prefect-dbt==0.6.0 in a clean environment and executing import prefect_dbt immediately fails with a ModuleNotFoundError error:
# python -c "import prefect_dbt"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/emilchristensen/github/tmp/.venv/lib/python3.12/site-packages/prefect_dbt/__init__.py", line 4, in <module>
from .cli import ( # noqa
File "/Users/emilchristensen/github/tmp/.venv/lib/python3.12/site-packages/prefect_dbt/cli/__init__.py", line 1, in <module>
from .credentials import DbtCliProfile # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/emilchristensen/github/tmp/.venv/lib/python3.12/site-packages/prefect_dbt/cli/credentials.py", line 8, in <module>
from prefect_dbt.cli.configs import GlobalConfigs, TargetConfigs
File "/Users/emilchristensen/github/tmp/.venv/lib/python3.12/site-packages/prefect_dbt/cli/configs/__init__.py", line 9, in <module>
from .bigquery import BigQueryTargetConfigs # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/emilchristensen/github/tmp/.venv/lib/python3.12/site-packages/prefect_dbt/cli/configs/bigquery.py", line 5, in <module>
from google.auth.transport.requests import Request
ModuleNotFoundError: No module named 'google.auth'
Bug summary
Installing
prefect-dbt==0.6.0
in a clean environment and executingimport prefect_dbt
immediately fails with aModuleNotFoundError
error:Version info (
prefect version
output)Additional context
Installing
prefect-gcp
resolves the error, soprefect-gcp
likely contains the missing dependency.