-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Installing a package that depends on setuptools fails intermittently: Backend 'setuptools.build_meta:__legacy__' is not available.
#7611
Comments
Backend 'setuptools.build_meta:__legacy__' is not available.
you didn't provide any means to reproduce. installing docopt works fine for me. If you can reproduce then this probably wants reporting to https://github.com/pypa/build/, that's what poetry 1.4.0's "modern installer" uses. |
@dimbleby It doesn't seem to be a problem specific to the docopt package. Installing timeout-decorator package fails in the following case: Another case of this bug was reported in: requests-cache/requests-cache#797 |
From what I've seen so far, this bug doesn't occur when using Poetry 1.3.2. |
sure, that's all consistent with it being a problem only with the "modern installer" in poetry 1.4.0: and if so then, as above, it likely wants reporting to https://github.com/pypa/build/ |
For another case of this (if it helps reproduction), our When running a ChefBuildError
Backend 'setuptools.build_meta:__legacy__' is not available.
at /usr/local/lib/python3.9/site-packages/poetry/installation/chef.py:152 in _prepare
148│
149│ error = ChefBuildError("\n\n".join(message_parts))
150│
151│ if error is not None:
→ 152│ raise error from None
153│
154│ return path
155│
156│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
Note: This error originates from the build backend, and is likely not a problem with poetry but with pdpyras (4.5.2) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "pdpyras (==4.5.2) ; python_version >= "3.5""'. And I can confirm that if I run the command suggested, pdpyras installs perfectly fine. |
confirm for pluginbase-1.0.1. Works with poetry < 1.4.0, but not with poetry 1.4.0. Same error message. |
I tried to reproduce this issue by putting all mentioned packages into one pyproject.toml:
While I have not been able to reproduce the error message mentioned in this issue, I encountered a different issue: pypa/virtualenv#2516 I don't expect it to be related to this issue, but since a new virtualenv version (20.21.0) with a fix was released yesterday, you may want to try to update virtualenv in your poetry installation and confirm that this issue is still present. Note: The new virtualenv version cannot be used if poetry is installed with Python 3.9 on Windows, see Lines 80 to 84 in 0e72a55
|
Same behaviour here with |
For those experiencing this issue: update your lock files. It might've been luck (intermittent failure and all...), but here it started to behave again.[1] [1] ...and then immediately stumble into #7572, as I'm using Hypercorn, but that one is better understood and can be worked around without downgrading. |
You can also try update pip, in my case it resolved the issue |
For some libraries, change of the version of Python resolved errors. |
We encounter this sporadically with Poetry 1.4.1 running in Windows container as well. The error message is like:
|
This happens quite often (not quite reliably) with Python 3.9 on windows, Poetry 1.4.1. Installing wcwidth as a dependency... |
happened today with a package that has "bs4" as its dependency, when running windows with python 3.8 and 3.9, using poetry 1.4.1 due to recent poetry-core fix.
|
MacOS Catalina, Python 3.10.11, Poetry 1.4.1
|
To make sure this is not an issue that is fixed in the latest I am not aware of any universally applicable way to determine the version. If installed poetry via pipx, it should be as easy as running:
Otherwise, you probably have to search for poetry's environment manually. If you think, you are in the correct environment, you can run the following snippet:
|
Updating the |
We've also noticed this in the CI on Windows jobs across python 3.8, 3.9, 3.10 after upgrading poetry to
Confirming the lock file was updated after poetry upgrade with |
Thanks to @robbotorigami (#7611 (comment)) I was able to reproduce the issue and provide a fix in #8517. Feel free to try the PR. |
@radoering I tied the PR above locally and it doesn't resolve the issue for me locally. But neither do any of the proposed work arounds mentioned in this thread to date. I also have the issue irregardless of poetry and python version combo. So I suspect there is some other environment things at play too. Im on a very fresh macOS setup. |
I've tested #8517 in the CI workflows where I was seeing issues, and I no longer see any failures. The fix for the concurrency issue seems sensible and should resolve any issues arising from concurrent downloads. Based on the comments in this thread, it seems likely that this was the issue that most (but not all) of the users encountering this error were running into. I suspect that for those having success with the suggested workarounds, this PR will solve the issue. |
- Got an issue while installing project dependencies on Python 3.12 on CI. Workaround proposed in python-poetry/poetry#7611.
Sorry to (possibly?) be the bearer of bad news here: This build appears to fail (on Windows) with a very similar symptom to what is described here, despite using poetry 1.7.0, which contains #8517. 🤔
Notably, the suggested command succeeds:
|
I am also continuing to see the same build failure here on Windows, Ubuntu, and MacOSX despite using poetry 1.7.0 which contained the supposed fix, see this workflow: https://github.com/scottshambaugh/monaco/actions/runs/6763933260/job/18381632398 |
It's a different error, the key difference being |
Thank you @timwie! That did indeed resolve my error. |
that is not even close to being the same error: and by reproducing it with pip you have anyway proved that it is not a poetry problem. |
As recommended by python-poetry/poetry#7611 (comment)
As suggested by python-poetry/poetry#7611 (comment)
Same issue here, the Interim Solutions works for me. |
GitHub test workflow was pinning Poetry to v1.3.2 due to issue 7611 [1]. But that Poetry version blocks the installation of typing-extensions 4.7.1 on Python 3.12 due to multiple deprecated methods and classes being removed. Since Poetry v1.4.0 resolved 7611 [1], it unblocks the installation of typing-extensions >4.7.1 on Python 3.12 for Windows. [1]: python-poetry/poetry#7611 Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
GitHub test workflow was pinning Poetry to v1.3.2 due to issue 7611 [1]. But that Poetry version blocks the installation of typing-extensions 4.7.1 on Python 3.12 due to multiple deprecated methods and classes being removed. Since Poetry v1.4.0 resolved 7611 [1], it unblocks the installation of typing-extensions >4.7.1 on Python 3.12 for Windows. [1]: python-poetry/poetry#7611 Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
GitHub test workflow was pinning Poetry to v1.3.2 due to issue 7611 [1]. But that Poetry version blocks the installation of typing-extensions 4.7.1 on Python 3.12 due to multiple deprecated methods and classes being removed. Since Poetry v1.4.0 resolved 7611 [1], it unblocks the installation of typing-extensions >4.7.1 on Python 3.12 for Windows. [1]: python-poetry/poetry#7611 Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
GitHub test workflow was pinning Poetry to v1.3.2 due to issue 7611 [1]. But that Poetry version blocks the installation of typing-extensions 4.7.1 on Python 3.12 due to multiple deprecated methods and classes being removed. Since Poetry v1.4.0 resolved 7611 [1], it unblocks the installation of typing-extensions >4.7.1 on Python 3.12 for Windows. [1]: python-poetry/poetry#7611 Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
windows-2022
GitHub runner)-vvv
option) and have included the output below.Issue
Installing a package that depends on setuptools fails intermittently. This bug does not occur in poetry 1.3 and is found in poetry 1.4.
View full logs
Interim Solutions
There are several workarounds below that mitigate this issue.
poetry install
several timesThe text was updated successfully, but these errors were encountered: