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
Here is a simple use case: I would like a project to support python 3.7 through 3.11 with scipy. How should I construct the dependencies? It seems like a tool such a poetry should help, but I don't see how to get it to help.
I would like to start with python = ">=3.7,<3.12":
$ poetry add scipy
Using version ^1.10.1 for scipy
Updating dependencies
Resolving dependencies... (0.0s)
The current project's Python requirement (>=3.7,<3.12) is not compatible with some of the required packages Python requirement: - scipy requires Python <3.12,>=3.8, so it will not be satisfied for Python >=3.7,<3.8Because no versions of scipy match >1.10.1,<2.0.0 and scipy (1.10.1) requires Python <3.12,>=3.8, scipy is forbidden.So, because test-scipy depends on scipy (^1.10.1), version solving failed. • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties For scipy, a possible solution would be to set the `python` property to ">=3.8,<3.12" https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies, https://python-poetry.org/docs/dependency-specification/#using-environment-markers
This fails scipy requires Python <3.12,>=3.8, so it will not be satisfied for Python >=3.7,<3.8. Perhaps requiring such a wide range is too much. How about just python 3.7?
$ poetry env use 3.7
$ poetry add scipy
Using version ^1.10.1 for scipy
Updating dependencies
Resolving dependencies... (0.1s)
Package operations: 2 installs, 0 updates, 0 removals
• Installing numpy (1.24.3)
• Installing scipy (1.10.1)
Writing lock file
(work-base) Admins-MacBook-Pro-2:scipy mforbes$ poetry add scipy
Current Python version (3.8.16) is not allowed by the project (~=3.7.16).
Please change python executable via the "env use" command.
(work-base) Admins-MacBook-Pro-2:scipy mforbes$ poetry env use 3.7
Using virtualenv: /Users/mforbes/Library/Caches/pypoetry/virtualenvs/test-scipy-0LcpY0vh-py3.7
(work-base) Admins-MacBook-Pro-2:scipy mforbes$ poetry add scipy
Using version ^1.10.1 for scipy
Updating dependencies
Resolving dependencies... (0.0s)
The current project's Python requirement (>=3.7.16,<3.8.0) is not compatible with some of the required packages Python requirement: - scipy requires Python <3.12,>=3.8, so it will not be satisfied for Python >=3.7.16,<3.8.0Because no versions of scipy match >1.10.1,<2.0.0 and scipy (1.10.1) requires Python <3.12,>=3.8, scipy is forbidden.So, because test-scipy depends on scipy (^1.10.1), version solving failed. • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties For scipy, a possible solution would be to set the `python` property to "<empty>" https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies, https://python-poetry.org/docs/dependency-specification/#using-environment-markers
Now scipy requires Python <3.12,>=3.8, so it will not be satisfied for Python >=3.7.16,<3.8.0. Why can't poetry figure out that scipy 1.7.3 supports python 3.7? I thought this type of thing was what Poetry was designed for?
For the record, something like this works. Is there some way tools like Poetry can help me figure this out without having to manually scrub through the scipy historical records?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Here is a simple use case: I would like a project to support python 3.7 through 3.11 with scipy. How should I construct the dependencies? It seems like a tool such a poetry should help, but I don't see how to get it to help.
I would like to start with
python = ">=3.7,<3.12"
:pyproject.toml
Then add scipy:
poetry add scipy
This fails
scipy requires Python <3.12,>=3.8, so it will not be satisfied for Python >=3.7,<3.8
. Perhaps requiring such a wide range is too much. How about just python 3.7?I would like to start with
python = "~=3.7.16"
:pyproject.toml
Now
scipy requires Python <3.12,>=3.8, so it will not be satisfied for Python >=3.7.16,<3.8.0
. Why can't poetry figure out that scipy 1.7.3 supports python 3.7? I thought this type of thing was what Poetry was designed for?For the record, something like this works. Is there some way tools like Poetry can help me figure this out without having to manually scrub through the scipy historical records?
Beta Was this translation helpful? Give feedback.
All reactions