-
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 packages in a python 3.6 environment fail due to PEP 517 #6453
Comments
Ah, you beat me to it, I was just about to raise this issue too! I've got a Docker-based repro:
producing output:
|
Looks like the same error message as #6288, but in this case poetry is installed as recommended (i.e. not in the same venv) |
It is not entirely the same error message. |
poetry is simply shelling out to pip here, it looks as though your pip is broken. Similar issue in the pip repository pins the blame on debian - pypa/pip#7946 |
I can believe that, though this wasn't a problem in poetry <1.2 - I'm guessing there's been a change in the way poetry invokes pip/which pip it uses? Any suggestions to work around this issue? |
Poetry 1.2 makes use of PEP 517 for a variety of reasons -- there's not a way to disable it for our purposes. You can work around this by installing upstream pip and dropping the patched Debian version in your image -- |
Just tried out both the pip upgrade using
|
Are you installing Poetry into your system site-packages as well as your project? That looks like what I'd expect -- Poetry will be uninstalling its own dependencies out from under itself most likely. Your issue is not related to this thread -- instead it is #6398. |
No luck with either |
The |
Sorry, the original error from my post that includes the Dockerfile. |
I've done some digging and I'm not 100% sure why we're getting these issues, even with Python 3.6 built from source on Debian/Ubuntu. However, the unreleased 1.2 branch does have a behavior change that happens to mitigate this (by using the pip inside the target environment). However, it is very possible to not have a pip in the target environment, so I can't consider it to be a 100% complete fix. |
More debugging has been done -- this is a consequence of Poetry attempting to use its own embedded pip (or rather the pip embedded in the |
Thank you for looking into this! Very appreciated. I also tried built python from source to narrow down the problem. Poetry tries to run the following and fails: /tmp/foo/.venv/bin/python /home/john/.local/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/pip-21.3.1-py3-none-any.whl/pip install --disable-pip-version-check --prefix /tmp/foo/.venv --no-deps MarkupSafe-2.0.1.tar.gz Whereas works fine: /tmp/foo/.venv/bin/python -m pip install --disable-pip-version-check --prefix /tmp/foo/.venv --no-deps MarkupSafe-2.0.1.tar.gz The second attempt also uses pip 21.3.1. So the interpreter seems to support the used version. |
Can you please post the output of |
Here is a bit more detailed output and the pip versions.
|
poetry 1.2.1 doesn't default to the embedded pip. So for those who were hitting this it's likely worth trying again |
I had a similiar issue with
|
Can confirm as well, |
Glad to hear it -- anyone else who wants to chime in, please use a 👍 on a matching comment to avoid sending unnecessary emails 😄 |
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. |
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 22.0.1
Poetry version: 1.2.0
Link of a Gist with the contents of your pyproject.toml file: pyproject.toml
Issue
A dependency uses
MarkupSafe
and our project must support python ^3.6.2. Since I updated to poetry 1.2.0, I can not use the python 3.6 environment anymore.Installing
MarkupSafe
manually works, when I disable pep 517:> poetry run python -m pip install --no-use-pep517 markupSafe==2.0.1
However, there is no option to disable pep 517 in poetry.
Is there any other way to install such packages?
Errors
The text was updated successfully, but these errors were encountered: