early-businessperson-60137
01/02/2026, 10:44 PM$ pex --include-tools "dbt-core==1.9.0b4" "dbt-adapters==1.9.0" "dbt-common==1.12.0" -o dbt.pex
$ PEX_TOOLS=1 python dbt.pex venv --compile dbt_app/
Encountered collision populating /workspace/dbt_app from PEX at /workspace/dbt.pex:
1. /workspace/dbt_app/lib/python3.11/site-packages/dbt/__init__.py was provided by:
sha1:94e22461fd95af9540b21a7b27a0475c7753320d -> /home/vscode/.cache/pex/installed_wheels/2/824fff0951402dc641bc271eacc7689c7391ae53044f8a32fffe2a60c99e85c9/dbt_adapters-1.9.0-py3-none-any.whl/dbt/__init__.py
sha1:6598303830eb0ec5e957e02b78e86538843e1e97 -> /home/vscode/.cache/pex/installed_wheels/2/82505e139c5cf97745e86894b1b2817c13242259544116043678e35fc4f979a6/dbt_core-1.9.0b4-py3-none-any.whl/dbt/__init__.py
As the error describes, both dbt-core and dbt-adapters (which dbt-core depends on) provide an __init__.py which causes problems when unpacking the pex into a venv.
Are there any known workarounds to continue using this recipe with such a package? Or should we just run the pex normally without the multi-stage build?