Skip to content

Specifying different incompatible dependencies for different versions of python #4796

Answered by abn
Sbozzolo asked this question in Q&A
Discussion options

You must be logged in to vote

You can either updated your project to use python = "^3.6, <3.11" or update your numpy requirement to be:

numpy = [
    { version = "^1.18.5", python = ">=3.6, <3.10" },
    { version = "^1.21.4", python = ">=3.10, <3.11" },
]

The issue is by default the upper bound of ^3.6 is 4.0 (special case). This implies the project, unless explicitly specified supports all new 3.x versions of after 3.6. The changes above declares that either your project is only known good till 3.11 or that numpy will be installed only for versions <3.11. Personally the more correct solution is to specifiy your python support version upper bound.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Sbozzolo
Comment options

Answer selected by abn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants