Help: Version error for package dbt-labs/dbt_utils

The problem I’m having

I’m encountering an issue with my dbt project while trying to run the command dbt deps. The specific error message I’m receiving is as follows:

Version error for package dbt-labs/dbt_utils: Could not find a satisfactory version from options: ['<0.9.0', '>=0.9.0', '<2.0.0', '>=0.8.1', '<0.9.0']

The context of why I’m trying to do this

I’m currently working on a project that involves using dbt for data transformation and modeling. As part of this process, I need to manage package dependencies using the dbt deps command to ensure that the required packages are installed correctly. However, I’ve encountered this version-related error, which is preventing me from proceeding with the dependency installation.

What I’ve already tried

I’ve attempted a few troubleshooting steps to resolve this issue:

  1. Checking Package Versions: I reviewed the versions of the dbt-labs/dbt_utils package to ensure they align with the specified options in the error message. Unfortunately, none of the listed versions seem to satisfy the requirement.

  2. Updating dbt: I checked my dbt version and found that I’m using 1.6.0. To see if updating dbt would resolve the issue, I considered upgrading to a more recent version. However, I’m concerned about potential compatibility issues with the rest of the project.

Some example code or error messages

Here’s an example of the code I’m using and the error message I’m encountering:

$ dbt deps
Running with dbt=1.6.0
Encountered an error:
Version error for package dbt-labs/dbt_utils: Could not find a satisfactory version from options: ['<0.9.0', '>=0.9.0', '<2.0.0', '>=0.8.1', '<0.9.0']

I’m uncertain about how to proceed to overcome this version error and successfully manage my package dependencies in dbt.

Can you show your packages.yml file?

Hi brunoszdl, here is the input of my packages.yml file:

packages:
  - package: dbt-labs/audit_helper
    version: 0.9.0
  - package: dbt-labs/dbt_utils
    version: 1.1.1
  - package: dbt-labs/metrics
    version: 1.4.0

That is strange, dbt_utils version seems right, but the metrics version should cause problems.

Can you remove the metrics package and see if you can run dbt deps?

If so, you have to remove metrics package or downgrade your dbt version to 1.5

I also tested the same packages here with 1.6.0 and the problem is only with metrics