-
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
Install fails with Permission denied
when setting POETRY_VIRTUALENVS_CREATE=false
with Poetry 1.2.0b2
#5928
Comments
Permission denied
when setting POETRY_VIRTUALENVS_CREATE=false with Poetry 1.2.0b2Permission denied
when setting POETRY_VIRTUALENVS_CREATE=false
with Poetry 1.2.0b2
#4329 probably, and probably this is a good fix rather than a bug. What environment were you expecting to install in, if you haven't explicitly created an environment and activated it? Previously this code picked whatever environment poetry itself was installed in, which doesn't make a lot of sense. Now it picks the system environment which seems like a dangerous choice: but, as here, it mostly won't work because you won't have permission there. Anyway this duplicates #2049 (though possibly the reasons have changed since then!) |
I thought it would pick the system environment, which is what I wanted since I'm using a container. So the reason why it was working with Poetry <1.2.0 might be because it was using the virtual environment used to setup Poetry. Thanks for the explanation. This new behavior indeed makes more sense. |
Is there any way to restore the previous behavior? especially inside a docker image the creation of a venv is not really required |
A virtual environment is almost always a good idea (it's only 'optional' if you know the Python environment is pure and is not modified from upstream, see #6398). That being said, this issue is for permissions -- just like a non-container system, you'll need root to install to the system site-packages as a regular user. |
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 found several issues that look similar, but nothing with this exact error.
-vvv
option).Issue
poetry install
withPOETRY_VIRTUALENVS_CREATE=false
used to work fine on the official Python Docker image with Poetry 1.1.13 and below, but it is now failing with 1.2.0b2.Here's a sample Dockerfile I used for testing:
docker buildx build . --build-arg POETRY_VERSION=1.1.13
succeeds, butdocker buildx build . --build-arg POETRY_VERSION=1.2.0b2
fails with the following output:Error log
The same error happens with 1.2.0b1 and 1.2.0a1, but strangely not with 1.2.0a2.
The text was updated successfully, but these errors were encountered: