Poetry doesn't install the correct dependency according to its supported Python version
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option). -
OS version and name: ubuntu 21.10
-
Poetry version: 1.1.13
-
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/roipoussiere/94e123906e86448e755f04a1ad798d77
Issue
I have a wheel dependency on specific url for many platforms (Linuw/macOS/Windows) and many Python version (3.8, 3.9, 3.10).
Despite the fact I use Python 3.9, when I try poetry install
, the python 3.8 version of the wheel is downloaded.
I also tried to:
- replace
python = "^3.8"
bypython = "^3.9"
(same thing); - replace
python = "~3.8", markers = "platform_system == 'Linux'",
bymarkers = "python_version ~= '3.8' and platform_system == 'Linux'",
(same thing).
Maybe related to #5378 or #5205, I don’t think it’s the same issue but I’m not sure.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Poetry doesn't use the correct version of Python - Stack Overflow
The currently activated Python version 2.7.16 is not supported by the project (^3.8). Trying to find and use a compatible version.
Read more >FAQ | Documentation | Poetry - Python dependency ...
Once a release of your package is published, you cannot tweak its dependencies anymore in case a dependency breaks BC – you have...
Read more >Managing Python Projects and Dependencies in 2022
First, let's set up pyenv and set our terminal's default Python version to 3.9.0. Install pyenv using homebrew#. brew install pyenv. Install ......
Read more >Poetry - The Blue Book
You can specify the exact version of a package. This will tell Poetry to install this version and this version only. If other...
Read more >poetry - PyPI
Poetry helps you declare, manage and install dependencies of Python ... Compatible Python versions python = ">=3.8" # Standard dependency with semver ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Apologies if my double-negative confused you. We are agreeing.
I see a similar problem with something like the following:
In this case, poetry attempts to install only the first URL–if I look at
poetry.lock
, I see something likeSo, poetry only stores a single URL in the lock file, despite there being multiple URLs specified in
pyproject.toml
EDIT: The python versions above were incorrect (i.e., previously, it had
"~3.7"
, but it should have been"~3.7.0"
). I’ve fixed it now. Unfortunately, that doesn’t fix the behavior.