You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pyproject.toml: failing pyproject.toml (it is the one resulting from poetry init --no-interaction)
I am on the latest stable Poetry version, installed using a recommended method.
I have searched the issues of this repo and believe that this is not a duplicate.
I have consulted the FAQ and blog for any relevant entries or release notes.
No exception occurs when executing a command.
Issue
I was following the initialization steps for this article:
## create project directory
mkdir airflow-dbt
cd airflow-dbt
## use poetry to initialize the project and manage our dependencies
pip3 install poetry
poetry init --no-interaction
## install our dependencies (Create our virtualenv through poetry)
poetry add apache-airflow apache-airflow-providers-postgres dbt-postgres pandas astronomer-cosmos
and poetry failed to find a solution for the dependencies:
Using version ^2.7.0 for apache-airflow
Using version ^5.6.0 for apache-airflow-providers-postgres
Using version ^1.6.1 for dbt-postgres
Using version ^2.0.3 for pandas
Using version ^1.0.5 for astronomer-cosmos
Updating dependencies
Resolving dependencies... (9.7s)
Because no versions of dbt-postgres match >1.6.1,<1.7.0b1 || >1.7.0b1,<2.0.0
and dbt-postgres (1.7.0b1) depends on dbt-core (1.7.0b1), dbt-postgres (>1.6.1,<2.0.0) requires dbt-core (1.7.0b1).
And because dbt-core (1.7.0b1) depends on dbt-semantic-interfaces (>=0.2.0,<0.3.0), dbt-postgres (>1.6.1,<2.0.0) requires dbt-semantic-interfaces (>=0.2.0,<0.3.0).
And because dbt-postgres (1.6.1) depends on dbt-core (1.6.1)
and dbt-core (1.6.1) depends on dbt-semantic-interfaces (>=0.2.0,<0.3.0), dbt-postgres (>=1.6.1,<2.0.0) requires dbt-semantic-interfaces (>=0.2.0,<0.3.0).
Because dbt-semantic-interfaces (0.2.0) depends on jsonschema (>=3.0,<4.0)
and no versions of dbt-semantic-interfaces match >0.2.0,<0.3.0, dbt-semantic-interfaces (>=0.2.0,<0.3.0) requires jsonschema (>=3.0,<4.0).
Thus, dbt-postgres (>=1.6.1,<2.0.0) requires jsonschema (>=3.0,<4.0).
And because apache-airflow (2.7.0) depends on jsonschema (>=4.18.0)
and no versions of apache-airflow match >2.7.0,<3.0.0, dbt-postgres (>=1.6.1,<2.0.0) is incompatible with apache-airflow (>=2.7.0,<3.0.0).
So, because airflow-dbt2 depends on both apache-airflow (^2.7.0) and dbt-postgres (^1.6.1), version solving failed.
but it works using the restrictions added by the pyproject.toml of the git repository used in the article with:
Poetry comes with an exhaustive dependency resolver, which will always find a solution if it exists.
And get a detailed explanation if no solution exists.
In this case the solution exist and was not found.
The text was updated successfully, but these errors were encountered:
poetry add without further constraints always selects the latest version of the dependencies listed. Your solution uses not-the-latest eg of apache-airflow.
poetry init --no-interaction
)Issue
I was following the initialization steps for this article:
and poetry failed to find a solution for the dependencies:
but it works using the restrictions added by the pyproject.toml of the git repository used in the article with:
The description of the project says:
In this case the solution exist and was not found.
The text was updated successfully, but these errors were encountered: