Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nox-poetry does not seem to support the source directive in a poetry definition #1117

Open
thondeboer opened this issue Jun 15, 2023 · 0 comments

Comments

@thondeboer
Copy link

I have a package that requried pytorch and have the following directives in the pyproject.toml file

[tool.poetry.dependencies]
python = ">=3.8.1,<3.11"
.
.
.
torch = { version = "==2.0.1+cu118", source = "pytorch" }
torchvision = { version = "^0.15.2+cu118", source = "pytorch" }


[[tool.poetry.source]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cu118"
priority = "explicit"

when trying to run a nox session with the noxfile that uses nox-poetry, I get this error in a mypy session:

ERROR: Cannot install genyx==0.1.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    genyx 0.1.0 depends on torch==2.0.1+cu118
    The user requested (constraint) torch==2.0.1+cu118

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
nox > Session mypy-3.10 failed.

I'm suspecting that the pip install command does not use the source directive from the poetry file? Not sure where the issue lies, but suspecting nox-poetry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant