Skip to content
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

Closed
3 tasks done
jeandeaual opened this issue Jun 28, 2022 · 5 comments
Labels
kind/bug Something isn't working as expected

Comments

@jeandeaual
Copy link

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
    I found several issues that look similar, but nothing with this exact error.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

poetry install with POETRY_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:

#syntax=docker/dockerfile:1.3-labs

FROM python:3.10-bullseye

ARG POETRY_VERSION=1.1.13
ARG USERNAME=localuser

# Setup the user
RUN useradd -ms /bin/bash "${USERNAME}"

USER "${USERNAME}"
WORKDIR "/home/${USERNAME}"

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Install Poetry
RUN curl -sSL https://install.python-poetry.org | POETRY_VERSION="${POETRY_VERSION}" python -

ENV PATH="${PATH:+${PATH}:}/home/${USERNAME}/.local/bin"

COPY <<"EOF" pyproject.toml
[tool.poetry]
name = "poetry-test"
version = "0.1.0"
description = ""
authors = ["Test <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.10"
requests = "^2.28.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
EOF

RUN POETRY_VIRTUALENVS_CREATE=false poetry install -vvv

docker buildx build . --build-arg POETRY_VERSION=1.1.13 succeeds, but docker buildx build . --build-arg POETRY_VERSION=1.2.0b2 fails with the following output:

Error log
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 32B done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 transferring context: 2B done
#2 DONE 0.0s

#3 resolve image config for docker.io/docker/dockerfile:1.3-labs
#3 ...

#4 [auth] docker/dockerfile:pull token for registry-1.docker.io
#4 DONE 0.0s

#3 resolve image config for docker.io/docker/dockerfile:1.3-labs
#3 DONE 6.9s

#5 docker-image://docker.io/docker/dockerfile:1.3-labs@sha256:250ce669e1aeeb5ffb892b18039c3f0801466536cb4210c8eb2638e628859bfd
#5 CACHED

#6 [internal] load .dockerignore
#6 DONE 0.0s

#7 [internal] load build definition from Dockerfile
#7 DONE 0.0s

#8 [auth] library/python:pull token for registry-1.docker.io
#8 DONE 0.0s

#9 [internal] load metadata for docker.io/library/python:3.10-bullseye
#9 DONE 1.1s

#10 [1/6] FROM docker.io/library/python:3.10-bullseye@sha256:c9c129ca05303bb806e6a3a4ad9cbe50bc5b91b4d1a9031c1c9626e200599784
#10 DONE 0.0s

#11 [internal] preparing inline document
#11 DONE 0.0s

#12 [4/6] RUN curl -sSL https://install.python-poetry.org | POETRY_VERSION="1.2.0b2" python -
#12 CACHED

#13 [2/6] RUN useradd -ms /bin/bash "localuser"
#13 CACHED

#14 [3/6] WORKDIR /home/localuser
#14 CACHED

#15 [5/6] COPY <<EOF pyproject.toml
#15 CACHED

#16 [6/6] RUN POETRY_VIRTUALENVS_CREATE=false poetry install -vvv
#16 1.104 Skipping virtualenv creation, as specified in config file.
#16 1.425 Project environment contains an empty path in sys_path, ignoring.
#16 1.509 Updating dependencies
#16 1.510 Resolving dependencies...
#16 1.510    1: fact: poetry-test is 0.1.0
#16 1.511    1: derived: poetry-test
#16 1.514    1: fact: poetry-test depends on requests (^2.28.0)
#16 1.515    1: selecting poetry-test (0.1.0)
#16 1.515    1: derived: requests (>=2.28.0,<3.0.0)
#16 1.522 [keyring.backend] Loading KWallet
#16 1.522 [keyring.backend] Loading SecretService
#16 1.537 [keyring.backend] Loading Windows
#16 1.538 [keyring.backend] Loading chainer
#16 1.539 [keyring.backend] Loading libsecret
#16 1.539 [keyring.backend] Loading macOS
#16 1.587 No suitable keyring backend found
#16 1.587 No suitable keyring backend found
#16 1.588 No suitable keyring backends were found
#16 1.588 No suitable keyring backends were found
#16 1.588 Keyring is not available, credentials will be stored and retrieved from configuration files as plaintext.
#16 1.588 Keyring is not available, credentials will be stored and retrieved from configuration files as plaintext.
#16 1.589 Creating new session for pypi.org
#16 1.592 [urllib3.connectionpool] Starting new HTTPS connection (1): pypi.org:443
#16 1.641 [urllib3.connectionpool] https://pypi.org:443 "GET /pypi/requests/json HTTP/1.1" 200 32719
#16 1.652 Source (PyPI): No release information found for requests-0.0.1, skipping
#16 1.653 Source (PyPI): No release information found for requests-0.12.01, skipping
#16 1.656 Source (PyPI): No release information found for requests-2.15.0, skipping
#16 1.658 Source (PyPI): 1 packages found for requests >=2.28.0,<3.0.0
#16 1.658 Source (PyPI): Getting info for requests (2.28.0) from PyPI
#16 1.666 [urllib3.connectionpool] https://pypi.org:443 "GET /pypi/requests/2.28.0/json HTTP/1.1" 200 32719
#16 1.709    1: fact: requests (2.28.0) depends on charset-normalizer (>=2.0.0,<2.1.0)
#16 1.709    1: fact: requests (2.28.0) depends on idna (>=2.5,<4)
#16 1.710    1: fact: requests (2.28.0) depends on urllib3 (>=1.21.1,<1.27)
#16 1.710    1: fact: requests (2.28.0) depends on certifi (>=2017.4.17)
#16 1.711    1: selecting requests (2.28.0)
#16 1.712    1: derived: certifi (>=2017.4.17)
#16 1.712    1: derived: urllib3 (>=1.21.1,<1.27)
#16 1.713    1: derived: idna (>=2.5,<4)
#16 1.713    1: derived: charset-normalizer (>=2.0.0,<2.1.0)
#16 1.723 [urllib3.connectionpool] https://pypi.org:443 "GET /pypi/certifi/json HTTP/1.1" 200 14350
#16 1.727 Source (PyPI): No release information found for certifi-0, skipping
#16 1.729 Source (PyPI): 25 packages found for certifi >=2017.4.17
#16 1.754 [urllib3.connectionpool] https://pypi.org:443 "GET /pypi/urllib3/json HTTP/1.1" 200 34507
#16 1.764 Source (PyPI): No release information found for urllib3-0.3, skipping
#16 1.764 Source (PyPI): No release information found for urllib3-0.3.1, skipping
#16 1.765 Source (PyPI): No release information found for urllib3-0.4.0, skipping
#16 1.765 Source (PyPI): No release information found for urllib3-0.4.1, skipping
#16 1.767 Source (PyPI): 29 packages found for urllib3 >=1.21.1,<1.27
#16 1.779 [urllib3.connectionpool] https://pypi.org:443 "GET /pypi/idna/json HTTP/1.1" 200 10499
#16 1.782 Source (PyPI): No release information found for idna-0.1, skipping
#16 1.783 Source (PyPI): 10 packages found for idna >=2.5,<4
#16 1.792 [urllib3.connectionpool] https://pypi.org:443 "GET /pypi/charset-normalizer/json HTTP/1.1" 200 14699
#16 1.796 Source (PyPI): 13 packages found for charset-normalizer >=2.0.0,<2.1.0
#16 1.797 Source (PyPI): Getting info for idna (3.3) from PyPI
#16 1.805 [urllib3.connectionpool] https://pypi.org:443 "GET /pypi/idna/3.3/json HTTP/1.1" 200 10499
#16 1.808 Source (PyPI): No dependencies found, downloading archives
#16 1.808 Source (PyPI): Downloading wheel: idna-3.3-py3-none-any.whl
#16 1.808 Creating new session for files.pythonhosted.org
#16 1.810 [urllib3.connectionpool] Starting new HTTPS connection (1): files.pythonhosted.org:443
#16 1.863 [urllib3.connectionpool] https://files.pythonhosted.org:443 "GET /packages/04/a2/d918dcd22354d8958fe113e1a3630137e0fc8b44859ade3063982eacd2a4/idna-3.3-py3-none-any.whl HTTP/1.1" 200 61160
#16 1.881    1: selecting idna (3.3)
#16 1.881 Source (PyPI): Getting info for charset-normalizer (2.0.12) from PyPI
#16 1.891 [urllib3.connectionpool] https://pypi.org:443 "GET /pypi/charset-normalizer/2.0.12/json HTTP/1.1" 200 14640
#16 1.896    1: selecting charset-normalizer (2.0.12)
#16 1.897 Source (PyPI): Getting info for certifi (2022.6.15) from PyPI
#16 1.905 [urllib3.connectionpool] https://pypi.org:443 "GET /pypi/certifi/2022.6.15/json HTTP/1.1" 200 14346
#16 1.911 Source (PyPI): No dependencies found, downloading archives
#16 1.911 Source (PyPI): Downloading wheel: certifi-2022.6.15-py3-none-any.whl
#16 1.920 [urllib3.connectionpool] https://files.pythonhosted.org:443 "GET /packages/e9/06/d3d367b7af6305b16f0d28ae2aaeb86154fa91f144f036c2d5002a5a202b/certifi-2022.6.15-py3-none-any.whl HTTP/1.1" 200 160247
#16 1.937    1: selecting certifi (2022.6.15)
#16 1.938 Source (PyPI): Getting info for urllib3 (1.26.9) from PyPI
#16 1.961 [urllib3.connectionpool] https://pypi.org:443 "GET /pypi/urllib3/1.26.9/json HTTP/1.1" 200 34507
#16 1.982    1: selecting urllib3 (1.26.9)
#16 1.982    1: Version solving took 0.473 seconds.
#16 1.982    1: Tried 1 solutions.
#16 2.010 
#16 2.010 Writing lock file
#16 2.011 
#16 2.011 Finding the necessary packages for the current system
#16 2.143 
#16 2.143 Package operations: 5 installs, 0 updates, 0 removals
#16 2.143 
#16 2.144   • Installing certifi (2022.6.15)
#16 2.145   • Installing charset-normalizer (2.0.12)
#16 2.150   • Installing idna (3.3)
#16 2.157   • Installing urllib3 (1.26.9)
#16 2.334 No suitable keyring backend found
#16 2.334 No suitable keyring backend found
#16 2.334 No suitable keyring backends were found
#16 2.334 No suitable keyring backends were found
#16 2.334 Keyring is not available, credentials will be stored and retrieved from configuration files as plaintext.
#16 2.334 Keyring is not available, credentials will be stored and retrieved from configuration files as plaintext.
#16 2.335 Creating new session for files.pythonhosted.org
#16 2.337 [urllib3.connectionpool] Starting new HTTPS connection (1): files.pythonhosted.org:443
#16 2.344 [urllib3.connectionpool] Starting new HTTPS connection (2): files.pythonhosted.org:443
#16 2.346 [urllib3.connectionpool] Starting new HTTPS connection (3): files.pythonhosted.org:443
#16 2.364 [urllib3.connectionpool] Starting new HTTPS connection (4): files.pythonhosted.org:443
#16 2.401 [urllib3.connectionpool] https://files.pythonhosted.org:443 "GET /packages/e9/06/d3d367b7af6305b16f0d28ae2aaeb86154fa91f144f036c2d5002a5a202b/certifi-2022.6.15-py3-none-any.whl HTTP/1.1" 200 160247
#16 2.415 [urllib3.connectionpool] https://files.pythonhosted.org:443 "GET /packages/04/a2/d918dcd22354d8958fe113e1a3630137e0fc8b44859ade3063982eacd2a4/idna-3.3-py3-none-any.whl HTTP/1.1" 200 61160
#16 2.426 [urllib3.connectionpool] https://files.pythonhosted.org:443 "GET /packages/06/b3/24afc8868eba069a7f03650ac750a778862dc34941a4bebeb58706715726/charset_normalizer-2.0.12-py3-none-any.whl HTTP/1.1" 200 39623
#16 2.434 [urllib3.connectionpool] https://files.pythonhosted.org:443 "GET /packages/ec/03/062e6444ce4baf1eac17a6a0ebfe36bb1ad05e1df0e20b110de59c278498/urllib3-1.26.9-py2.py3-none-any.whl HTTP/1.1" 200 138990
#16 5.268 
#16 5.268   Stack trace:
#16 5.269 
#16 5.269   2  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1493 in _run
#16 5.369       1491│                 )
#16 5.369       1492│             else:
#16 5.369     → 1493│                 output = subprocess.check_output(
#16 5.369       1494│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
#16 5.369       1495│                 )
#16 5.369 
#16 5.369   1  /usr/local/lib/python3.10/subprocess.py:420 in check_output
#16 5.429        418│         kwargs['input'] = empty
#16 5.429        419│ 
#16 5.429     →  420│     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
#16 5.429        421│                **kwargs).stdout
#16 5.429        422│ 
#16 5.429 
#16 5.429   CalledProcessError
#16 5.429 
#16 5.429   Command '['/usr/local/bin/python3.10', '/home/localuser/.local/share/pypoetry/venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/pip-22.1.2-py3-none-any.whl/pip', 'install', '--disable-pip-version-check', '--prefix', '/usr/local', '--no-deps', '/home/localuser/.cache/pypoetry/artifacts/90/36/8c/81eabf6ac88608721ab27f439c9a6b9a8e6a21cc58c59ebb1a42720199/idna-3.3-py3-none-any.whl']' returned non-zero exit status 1.
#16 5.429 
#16 5.429   at /usr/local/lib/python3.10/subprocess.py:524 in run
#16 5.483        520│             # We don't call process.wait() as .__exit__ does that for us.
#16 5.483        521│             raise
#16 5.483        522│         retcode = process.poll()
#16 5.484        523│         if check and retcode:
#16 5.484     →  524│             raise CalledProcessError(retcode, process.args,
#16 5.484        525│                                      output=stdout, stderr=stderr)
#16 5.484        526│     return CompletedProcess(process.args, retcode, stdout, stderr)
#16 5.484        527│ 
#16 5.484        528│ 
#16 5.484 
#16 5.484 The following error occurred when trying to handle this error:
#16 5.484 
#16 5.484 
#16 5.484   Stack trace:
#16 5.484 
#16 5.484   3  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/pip.py:53 in pip_install
#16 5.487        51│ 
#16 5.487        52│     try:
#16 5.488     →  53│         return environment.run_pip(*args)
#16 5.488        54│     except EnvCommandError as e:
#16 5.488        55│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
#16 5.488 
#16 5.488   2  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1456 in run_pip
#16 5.544       1454│         pip = self.get_pip_command(embedded=True)
#16 5.544       1455│         cmd = pip + list(args)
#16 5.544     → 1456│         return self._run(cmd, **kwargs)
#16 5.545       1457│ 
#16 5.545       1458│     def run_python_script(self, content: str, **kwargs: Any) -> int | str:
#16 5.545 
#16 5.545   1  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1867 in _run
#16 5.600       1865│ 
#16 5.601       1866│     def _run(self, cmd: list[str], **kwargs: Any) -> int | str:
#16 5.601     → 1867│         return super(VirtualEnv, self)._run(cmd, **kwargs)
#16 5.601       1868│ 
#16 5.601       1869│     def is_venv(self) -> bool:
#16 5.601 
#16 5.601   EnvCommandError
#16 5.601 
#16 5.601   Command ['/usr/local/bin/python3.10', '/home/localuser/.local/share/pypoetry/venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/pip-22.1.2-py3-none-any.whl/pip', 'install', '--disable-pip-version-check', '--prefix', '/usr/local', '--no-deps', '/home/localuser/.cache/pypoetry/artifacts/90/36/8c/81eabf6ac88608721ab27f439c9a6b9a8e6a21cc58c59ebb1a42720199/idna-3.3-py3-none-any.whl'] errored with the following return code 1, and output: 
#16 5.601   Processing ./.cache/pypoetry/artifacts/90/36/8c/81eabf6ac88608721ab27f439c9a6b9a8e6a21cc58c59ebb1a42720199/idna-3.3-py3-none-any.whl
#16 5.601   Installing collected packages: idna
#16 5.601   ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/usr/local/lib/python3.10/site-packages/idna'
#16 5.601   Consider using the `--user` option or check the permissions.
#16 5.601   
#16 5.601   
#16 5.601 
#16 5.601   at .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1497 in _run
#16 5.658       1493│                 output = subprocess.check_output(
#16 5.658       1494│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
#16 5.658       1495│                 )
#16 5.658       1496│         except CalledProcessError as e:
#16 5.658     → 1497│             raise EnvCommandError(e, input=input_)
#16 5.658       1498│ 
#16 5.658       1499│         return decode(output)
#16 5.658       1500│ 
#16 5.658       1501│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:
#16 5.658 
#16 5.658 The following error occurred when trying to handle this error:
#16 5.658 
#16 5.658 
#16 5.658   Stack trace:
#16 5.659 
#16 5.659   5  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:246 in _execute_operation
#16 5.685       244│ 
#16 5.685       245│             try:
#16 5.685     → 246│                 result = self._do_execute_operation(operation)
#16 5.685       247│             except EnvCommandError as e:
#16 5.685       248│                 if e.e.returncode == -2:
#16 5.685 
#16 5.685   4  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:318 in _do_execute_operation
#16 5.711       316│             return 0
#16 5.711       317│ 
#16 5.711     → 318│         result: int = getattr(self, f"_execute_{method}")(operation)
#16 5.712       319│ 
#16 5.712       320│         if result != 0:
#16 5.712 
#16 5.712   3  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:438 in _execute_install
#16 5.737       436│ 
#16 5.737       437│     def _execute_install(self, operation: Install | Update) -> int:
#16 5.738     → 438│         status_code = self._install(operation)
#16 5.738       439│ 
#16 5.738       440│         self._save_url_reference(operation)
#16 5.738 
#16 5.738   2  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:481 in _install
#16 5.766       479│         )
#16 5.766       480│         self._write(operation, message)
#16 5.767     → 481│         return self.pip_install(archive, upgrade=operation.job_type == "update")
#16 5.767       482│ 
#16 5.767       483│     def _update(self, operation: Install | Update) -> int:
#16 5.767 
#16 5.767   1  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:120 in pip_install
#16 5.794       118│     ) -> int:
#16 5.794       119│         try:
#16 5.794     → 120│             pip_install(req, self._env, upgrade=upgrade, editable=editable)
#16 5.794       121│         except EnvCommandError as e:
#16 5.794       122│             output = decode(e.e.output)
#16 5.794 
#16 5.794   PoetryException
#16 5.794 
#16 5.794   Failed to install /home/localuser/.cache/pypoetry/artifacts/90/36/8c/81eabf6ac88608721ab27f439c9a6b9a8e6a21cc58c59ebb1a42720199/idna-3.3-py3-none-any.whl
#16 5.794 
#16 5.794   at .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/pip.py:55 in pip_install
#16 5.797        51│ 
#16 5.797        52│     try:
#16 5.797        53│         return environment.run_pip(*args)
#16 5.797        54│     except EnvCommandError as e:
#16 5.797     →  55│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
#16 5.798        56│ 
#16 5.798 
#16 5.798 
#16 5.798   Stack trace:
#16 5.798 
#16 5.799   2  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1493 in _run
#16 5.799       1491│                 )
#16 5.799       1492│             else:
#16 5.799     → 1493│                 output = subprocess.check_output(
#16 5.799       1494│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
#16 5.799       1495│                 )
#16 5.800 
#16 5.800   1  /usr/local/lib/python3.10/subprocess.py:420 in check_output
#16 5.800        418│         kwargs['input'] = empty
#16 5.800        419│ 
#16 5.800     →  420│     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
#16 5.800        421│                **kwargs).stdout
#16 5.800        422│ 
#16 5.800 
#16 5.800   CalledProcessError
#16 5.800 
#16 5.800   Command '['/usr/local/bin/python3.10', '/home/localuser/.local/share/pypoetry/venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/pip-22.1.2-py3-none-any.whl/pip', 'install', '--disable-pip-version-check', '--prefix', '/usr/local', '--no-deps', '/home/localuser/.cache/pypoetry/artifacts/88/1c/d5/a55ed0245e5d7cd3a9f40dd75733644cbf7b7d94a6c521eb6c027a326c/urllib3-1.26.9-py2.py3-none-any.whl']' returned non-zero exit status 1.
#16 5.800 
#16 5.800   at /usr/local/lib/python3.10/subprocess.py:524 in run
#16 5.851        520│             # We don't call process.wait() as .__exit__ does that for us.
#16 5.851        521│             raise
#16 5.851        522│         retcode = process.poll()
#16 5.851        523│         if check and retcode:
#16 5.851     →  524│             raise CalledProcessError(retcode, process.args,
#16 5.851        525│                                      output=stdout, stderr=stderr)
#16 5.852        526│     return CompletedProcess(process.args, retcode, stdout, stderr)
#16 5.852        527│ 
#16 5.852        528│ 
#16 5.852 
#16 5.852 The following error occurred when trying to handle this error:
#16 5.852 
#16 5.852 
#16 5.852   Stack trace:
#16 5.852 
#16 5.852   3  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/pip.py:53 in pip_install
#16 5.852        51│ 
#16 5.852        52│     try:
#16 5.852     →  53│         return environment.run_pip(*args)
#16 5.852        54│     except EnvCommandError as e:
#16 5.852        55│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
#16 5.853 
#16 5.853   2  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1456 in run_pip
#16 5.853       1454│         pip = self.get_pip_command(embedded=True)
#16 5.853       1455│         cmd = pip + list(args)
#16 5.853     → 1456│         return self._run(cmd, **kwargs)
#16 5.853       1457│ 
#16 5.853       1458│     def run_python_script(self, content: str, **kwargs: Any) -> int | str:
#16 5.853 
#16 5.854   1  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1867 in _run
#16 5.854       1865│ 
#16 5.854       1866│     def _run(self, cmd: list[str], **kwargs: Any) -> int | str:
#16 5.854     → 1867│         return super(VirtualEnv, self)._run(cmd, **kwargs)
#16 5.854       1868│ 
#16 5.854       1869│     def is_venv(self) -> bool:
#16 5.854 
#16 5.854   EnvCommandError
#16 5.854 
#16 5.854   Command ['/usr/local/bin/python3.10', '/home/localuser/.local/share/pypoetry/venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/pip-22.1.2-py3-none-any.whl/pip', 'install', '--disable-pip-version-check', '--prefix', '/usr/local', '--no-deps', '/home/localuser/.cache/pypoetry/artifacts/88/1c/d5/a55ed0245e5d7cd3a9f40dd75733644cbf7b7d94a6c521eb6c027a326c/urllib3-1.26.9-py2.py3-none-any.whl'] errored with the following return code 1, and output: 
#16 5.854   Processing ./.cache/pypoetry/artifacts/88/1c/d5/a55ed0245e5d7cd3a9f40dd75733644cbf7b7d94a6c521eb6c027a326c/urllib3-1.26.9-py2.py3-none-any.whl
#16 5.854   Installing collected packages: urllib3
#16 5.854   ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/usr/local/lib/python3.10/site-packages/urllib3'
#16 5.854   Consider using the `--user` option or check the permissions.
#16 5.854   
#16 5.854   
#16 5.854 
#16 5.854   at .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1497 in _run
#16 5.907       1493│                 output = subprocess.check_output(
#16 5.907       1494│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
#16 5.907       1495│                 )
#16 5.907       1496│         except CalledProcessError as e:
#16 5.907     → 1497│             raise EnvCommandError(e, input=input_)
#16 5.907       1498│ 
#16 5.907       1499│         return decode(output)
#16 5.907       1500│ 
#16 5.907       1501│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:
#16 5.907 
#16 5.907 The following error occurred when trying to handle this error:
#16 5.907 
#16 5.907 
#16 5.908   Stack trace:
#16 5.908 
#16 5.908   5  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:246 in _execute_operation
#16 5.908       244│ 
#16 5.908       245│             try:
#16 5.909     → 246│                 result = self._do_execute_operation(operation)
#16 5.909       247│             except EnvCommandError as e:
#16 5.909       248│                 if e.e.returncode == -2:
#16 5.909 
#16 5.909   4  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:318 in _do_execute_operation
#16 5.909       316│             return 0
#16 5.909       317│ 
#16 5.909     → 318│         result: int = getattr(self, f"_execute_{method}")(operation)
#16 5.909       319│ 
#16 5.909       320│         if result != 0:
#16 5.909 
#16 5.909   3  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:438 in _execute_install
#16 5.909       436│ 
#16 5.909       437│     def _execute_install(self, operation: Install | Update) -> int:
#16 5.909     → 438│         status_code = self._install(operation)
#16 5.909       439│ 
#16 5.909       440│         self._save_url_reference(operation)
#16 5.910 
#16 5.910   2  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:481 in _install
#16 5.910       479│         )
#16 5.910       480│         self._write(operation, message)
#16 5.910     → 481│         return self.pip_install(archive, upgrade=operation.job_type == "update")
#16 5.910       482│ 
#16 5.910       483│     def _update(self, operation: Install | Update) -> int:
#16 5.910 
#16 5.911   1  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:120 in pip_install
#16 5.911       118│     ) -> int:
#16 5.911       119│         try:
#16 5.911     → 120│             pip_install(req, self._env, upgrade=upgrade, editable=editable)
#16 5.911       121│         except EnvCommandError as e:
#16 5.911       122│             output = decode(e.e.output)
#16 5.911 
#16 5.911   PoetryException
#16 5.911 
#16 5.911   Failed to install /home/localuser/.cache/pypoetry/artifacts/88/1c/d5/a55ed0245e5d7cd3a9f40dd75733644cbf7b7d94a6c521eb6c027a326c/urllib3-1.26.9-py2.py3-none-any.whl
#16 5.912 
#16 5.912   at .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/pip.py:55 in pip_install
#16 5.914        51│ 
#16 5.914        52│     try:
#16 5.914        53│         return environment.run_pip(*args)
#16 5.914        54│     except EnvCommandError as e:
#16 5.914     →  55│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
#16 5.914        56│ 
#16 5.914 
#16 5.915 
#16 5.915   Stack trace:
#16 5.915 
#16 5.915   2  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1493 in _run
#16 5.915       1491│                 )
#16 5.915       1492│             else:
#16 5.915     → 1493│                 output = subprocess.check_output(
#16 5.915       1494│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
#16 5.915       1495│                 )
#16 5.915 
#16 5.915   1  /usr/local/lib/python3.10/subprocess.py:420 in check_output
#16 5.915        418│         kwargs['input'] = empty
#16 5.915        419│ 
#16 5.915     →  420│     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
#16 5.915        421│                **kwargs).stdout
#16 5.916        422│ 
#16 5.916 
#16 5.916   CalledProcessError
#16 5.916 
#16 5.916   Command '['/usr/local/bin/python3.10', '/home/localuser/.local/share/pypoetry/venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/pip-22.1.2-py3-none-any.whl/pip', 'install', '--disable-pip-version-check', '--prefix', '/usr/local', '--no-deps', '/home/localuser/.cache/pypoetry/artifacts/d5/27/31/db4fb74906e3a7f55f720e0079ac1850dd86e30651cdfa5e1f04c53cfa/charset_normalizer-2.0.12-py3-none-any.whl']' returned non-zero exit status 1.
#16 5.916 
#16 5.916   at /usr/local/lib/python3.10/subprocess.py:524 in run
#16 5.967        520│             # We don't call process.wait() as .__exit__ does that for us.
#16 5.967        521│             raise
#16 5.967        522│         retcode = process.poll()
#16 5.967        523│         if check and retcode:
#16 5.967     →  524│             raise CalledProcessError(retcode, process.args,
#16 5.967        525│                                      output=stdout, stderr=stderr)
#16 5.967        526│     return CompletedProcess(process.args, retcode, stdout, stderr)
#16 5.967        527│ 
#16 5.967        528│ 
#16 5.967 
#16 5.967 The following error occurred when trying to handle this error:
#16 5.967 
#16 5.967 
#16 5.967   Stack trace:
#16 5.967 
#16 5.967   3  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/pip.py:53 in pip_install
#16 5.967        51│ 
#16 5.968        52│     try:
#16 5.968     →  53│         return environment.run_pip(*args)
#16 5.968        54│     except EnvCommandError as e:
#16 5.968        55│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
#16 5.968 
#16 5.968   2  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1456 in run_pip
#16 5.968       1454│         pip = self.get_pip_command(embedded=True)
#16 5.968       1455│         cmd = pip + list(args)
#16 5.969     → 1456│         return self._run(cmd, **kwargs)
#16 5.969       1457│ 
#16 5.969       1458│     def run_python_script(self, content: str, **kwargs: Any) -> int | str:
#16 5.969 
#16 5.969   1  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1867 in _run
#16 5.969       1865│ 
#16 5.969       1866│     def _run(self, cmd: list[str], **kwargs: Any) -> int | str:
#16 5.969     → 1867│         return super(VirtualEnv, self)._run(cmd, **kwargs)
#16 5.969       1868│ 
#16 5.969       1869│     def is_venv(self) -> bool:
#16 5.969 
#16 5.969   EnvCommandError
#16 5.969 
#16 5.969   Command ['/usr/local/bin/python3.10', '/home/localuser/.local/share/pypoetry/venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/pip-22.1.2-py3-none-any.whl/pip', 'install', '--disable-pip-version-check', '--prefix', '/usr/local', '--no-deps', '/home/localuser/.cache/pypoetry/artifacts/d5/27/31/db4fb74906e3a7f55f720e0079ac1850dd86e30651cdfa5e1f04c53cfa/charset_normalizer-2.0.12-py3-none-any.whl'] errored with the following return code 1, and output: 
#16 5.969   Processing ./.cache/pypoetry/artifacts/d5/27/31/db4fb74906e3a7f55f720e0079ac1850dd86e30651cdfa5e1f04c53cfa/charset_normalizer-2.0.12-py3-none-any.whl
#16 5.969   Installing collected packages: charset-normalizer
#16 5.969   ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/usr/local/lib/python3.10/site-packages/charset_normalizer'
#16 5.969   Consider using the `--user` option or check the permissions.
#16 5.969   
#16 5.969   
#16 5.969 
#16 5.969   at .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1497 in _run
#16 6.023       1493│                 output = subprocess.check_output(
#16 6.023       1494│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
#16 6.023       1495│                 )
#16 6.023       1496│         except CalledProcessError as e:
#16 6.023     → 1497│             raise EnvCommandError(e, input=input_)
#16 6.023       1498│ 
#16 6.023       1499│         return decode(output)
#16 6.023       1500│ 
#16 6.023       1501│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:
#16 6.023 
#16 6.023 The following error occurred when trying to handle this error:
#16 6.023 
#16 6.023 
#16 6.023   Stack trace:
#16 6.023 
#16 6.023   5  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:246 in _execute_operation
#16 6.023       244│ 
#16 6.023       245│             try:
#16 6.023     → 246│                 result = self._do_execute_operation(operation)
#16 6.023       247│             except EnvCommandError as e:
#16 6.024       248│                 if e.e.returncode == -2:
#16 6.024 
#16 6.024   4  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:318 in _do_execute_operation
#16 6.024       316│             return 0
#16 6.024       317│ 
#16 6.024     → 318│         result: int = getattr(self, f"_execute_{method}")(operation)
#16 6.024       319│ 
#16 6.024       320│         if result != 0:
#16 6.024 
#16 6.024   3  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:438 in _execute_install
#16 6.024       436│ 
#16 6.024       437│     def _execute_install(self, operation: Install | Update) -> int:
#16 6.024     → 438│         status_code = self._install(operation)
#16 6.024       439│ 
#16 6.024       440│         self._save_url_reference(operation)
#16 6.025 
#16 6.025   2  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:481 in _install
#16 6.025       479│         )
#16 6.025       480│         self._write(operation, message)
#16 6.025     → 481│         return self.pip_install(archive, upgrade=operation.job_type == "update")
#16 6.025       482│ 
#16 6.025       483│     def _update(self, operation: Install | Update) -> int:
#16 6.025 
#16 6.025   1  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:120 in pip_install
#16 6.025       118│     ) -> int:
#16 6.025       119│         try:
#16 6.025     → 120│             pip_install(req, self._env, upgrade=upgrade, editable=editable)
#16 6.025       121│         except EnvCommandError as e:
#16 6.025       122│             output = decode(e.e.output)
#16 6.025 
#16 6.025   PoetryException
#16 6.025 
#16 6.026   Failed to install /home/localuser/.cache/pypoetry/artifacts/d5/27/31/db4fb74906e3a7f55f720e0079ac1850dd86e30651cdfa5e1f04c53cfa/charset_normalizer-2.0.12-py3-none-any.whl
#16 6.026 
#16 6.026   at .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/pip.py:55 in pip_install
#16 6.027        51│ 
#16 6.027        52│     try:
#16 6.027        53│         return environment.run_pip(*args)
#16 6.027        54│     except EnvCommandError as e:
#16 6.027     →  55│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
#16 6.027        56│ 
#16 6.027 
#16 6.029 
#16 6.029   Stack trace:
#16 6.029 
#16 6.029   2  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1493 in _run
#16 6.029       1491│                 )
#16 6.029       1492│             else:
#16 6.029     → 1493│                 output = subprocess.check_output(
#16 6.030       1494│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
#16 6.030       1495│                 )
#16 6.030 
#16 6.030   1  /usr/local/lib/python3.10/subprocess.py:420 in check_output
#16 6.030        418│         kwargs['input'] = empty
#16 6.030        419│ 
#16 6.031     →  420│     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
#16 6.031        421│                **kwargs).stdout
#16 6.031        422│ 
#16 6.031 
#16 6.031   CalledProcessError
#16 6.031 
#16 6.031   Command '['/usr/local/bin/python3.10', '/home/localuser/.local/share/pypoetry/venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/pip-22.1.2-py3-none-any.whl/pip', 'install', '--disable-pip-version-check', '--prefix', '/usr/local', '--no-deps', '/home/localuser/.cache/pypoetry/artifacts/b1/9b/6f/cd63ce97294ee9a1fb57e5cebf02f251fbb8f9ac48353a27ceeddc410b/certifi-2022.6.15-py3-none-any.whl']' returned non-zero exit status 1.
#16 6.031 
#16 6.031   at /usr/local/lib/python3.10/subprocess.py:524 in run
#16 6.082        520│             # We don't call process.wait() as .__exit__ does that for us.
#16 6.082        521│             raise
#16 6.082        522│         retcode = process.poll()
#16 6.082        523│         if check and retcode:
#16 6.082     →  524│             raise CalledProcessError(retcode, process.args,
#16 6.082        525│                                      output=stdout, stderr=stderr)
#16 6.082        526│     return CompletedProcess(process.args, retcode, stdout, stderr)
#16 6.082        527│ 
#16 6.082        528│ 
#16 6.082 
#16 6.082 The following error occurred when trying to handle this error:
#16 6.082 
#16 6.082 
#16 6.082   Stack trace:
#16 6.082 
#16 6.082   3  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/pip.py:53 in pip_install
#16 6.082        51│ 
#16 6.082        52│     try:
#16 6.082     →  53│         return environment.run_pip(*args)
#16 6.083        54│     except EnvCommandError as e:
#16 6.083        55│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
#16 6.083 
#16 6.083   2  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1456 in run_pip
#16 6.083       1454│         pip = self.get_pip_command(embedded=True)
#16 6.083       1455│         cmd = pip + list(args)
#16 6.084     → 1456│         return self._run(cmd, **kwargs)
#16 6.084       1457│ 
#16 6.084       1458│     def run_python_script(self, content: str, **kwargs: Any) -> int | str:
#16 6.084 
#16 6.084   1  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1867 in _run
#16 6.084       1865│ 
#16 6.085       1866│     def _run(self, cmd: list[str], **kwargs: Any) -> int | str:
#16 6.085     → 1867│         return super(VirtualEnv, self)._run(cmd, **kwargs)
#16 6.085       1868│ 
#16 6.085       1869│     def is_venv(self) -> bool:
#16 6.085 
#16 6.085   EnvCommandError
#16 6.085 
#16 6.085   Command ['/usr/local/bin/python3.10', '/home/localuser/.local/share/pypoetry/venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/pip-22.1.2-py3-none-any.whl/pip', 'install', '--disable-pip-version-check', '--prefix', '/usr/local', '--no-deps', '/home/localuser/.cache/pypoetry/artifacts/b1/9b/6f/cd63ce97294ee9a1fb57e5cebf02f251fbb8f9ac48353a27ceeddc410b/certifi-2022.6.15-py3-none-any.whl'] errored with the following return code 1, and output: 
#16 6.085   Processing ./.cache/pypoetry/artifacts/b1/9b/6f/cd63ce97294ee9a1fb57e5cebf02f251fbb8f9ac48353a27ceeddc410b/certifi-2022.6.15-py3-none-any.whl
#16 6.085   Installing collected packages: certifi
#16 6.085   ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/usr/local/lib/python3.10/site-packages/certifi'
#16 6.085   Consider using the `--user` option or check the permissions.
#16 6.085   
#16 6.085   
#16 6.086 
#16 6.086   at .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1497 in _run
#16 6.139       1493│                 output = subprocess.check_output(
#16 6.139       1494│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
#16 6.139       1495│                 )
#16 6.139       1496│         except CalledProcessError as e:
#16 6.140     → 1497│             raise EnvCommandError(e, input=input_)
#16 6.140       1498│ 
#16 6.140       1499│         return decode(output)
#16 6.140       1500│ 
#16 6.140       1501│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:
#16 6.140 
#16 6.140 The following error occurred when trying to handle this error:
#16 6.140 
#16 6.140 
#16 6.140   Stack trace:
#16 6.140 
#16 6.140   5  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:246 in _execute_operation
#16 6.141       244│ 
#16 6.141       245│             try:
#16 6.141     → 246│                 result = self._do_execute_operation(operation)
#16 6.141       247│             except EnvCommandError as e:
#16 6.141       248│                 if e.e.returncode == -2:
#16 6.141 
#16 6.141   4  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:318 in _do_execute_operation
#16 6.141       316│             return 0
#16 6.142       317│ 
#16 6.142     → 318│         result: int = getattr(self, f"_execute_{method}")(operation)
#16 6.142       319│ 
#16 6.142       320│         if result != 0:
#16 6.142 
#16 6.142   3  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:438 in _execute_install
#16 6.142       436│ 
#16 6.143       437│     def _execute_install(self, operation: Install | Update) -> int:
#16 6.143     → 438│         status_code = self._install(operation)
#16 6.143       439│ 
#16 6.143       440│         self._save_url_reference(operation)
#16 6.143 
#16 6.143   2  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:481 in _install
#16 6.143       479│         )
#16 6.143       480│         self._write(operation, message)
#16 6.144     → 481│         return self.pip_install(archive, upgrade=operation.job_type == "update")
#16 6.144       482│ 
#16 6.144       483│     def _update(self, operation: Install | Update) -> int:
#16 6.144 
#16 6.144   1  .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/executor.py:120 in pip_install
#16 6.144       118│     ) -> int:
#16 6.145       119│         try:
#16 6.145     → 120│             pip_install(req, self._env, upgrade=upgrade, editable=editable)
#16 6.146       121│         except EnvCommandError as e:
#16 6.146       122│             output = decode(e.e.output)
#16 6.146 
#16 6.146   PoetryException
#16 6.146 
#16 6.146   Failed to install /home/localuser/.cache/pypoetry/artifacts/b1/9b/6f/cd63ce97294ee9a1fb57e5cebf02f251fbb8f9ac48353a27ceeddc410b/certifi-2022.6.15-py3-none-any.whl
#16 6.146 
#16 6.146   at .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/pip.py:55 in pip_install
#16 6.148        51│ 
#16 6.148        52│     try:
#16 6.148        53│         return environment.run_pip(*args)
#16 6.148        54│     except EnvCommandError as e:
#16 6.149     →  55│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
#16 6.149        56│ 
#16 6.149 
#16 ERROR: executor failed running [/bin/bash -o pipefail -c POETRY_VIRTUALENVS_CREATE=false poetry install -vvv]: exit code: 1
------
 > [6/6] RUN POETRY_VIRTUALENVS_CREATE=false poetry install -vvv:
#16 6.146   Failed to install /home/localuser/.cache/pypoetry/artifacts/b1/9b/6f/cd63ce97294ee9a1fb57e5cebf02f251fbb8f9ac48353a27ceeddc410b/certifi-2022.6.15-py3-none-any.whl
#16 6.146 
#16 6.146   at .local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/pip.py:55 in pip_install
#16 6.148        51│ 
#16 6.148        52│     try:
#16 6.148        53│         return environment.run_pip(*args)
#16 6.148        54│     except EnvCommandError as e:
#16 6.149     →  55│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
#16 6.149        56│ 
#16 6.149 
------
error: failed to solve: executor failed running [/bin/bash -o pipefail -c POETRY_VIRTUALENVS_CREATE=false poetry install -vvv]: exit code: 1

The same error happens with 1.2.0b1 and 1.2.0a1, but strangely not with 1.2.0a2.

@jeandeaual jeandeaual added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Jun 28, 2022
@jeandeaual jeandeaual changed the title Install fails with Permission denied when setting POETRY_VIRTUALENVS_CREATE=false with Poetry 1.2.0b2 Install fails with Permission denied when setting POETRY_VIRTUALENVS_CREATE=false with Poetry 1.2.0b2 Jun 28, 2022
@dimbleby
Copy link
Contributor

#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!)

@jeandeaual
Copy link
Author

I thought it would pick the system environment, which is what I wanted since I'm using a container.
I assumed it did something similar to pip install --user since I don't have the permission to write to the system Python environment, but I see now this is not the case.

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.

@mkniewallner mkniewallner removed the status/triage This issue needs to be triaged label Jun 29, 2022
@twsl
Copy link

twsl commented Oct 12, 2022

Is there any way to restore the previous behavior? especially inside a docker image the creation of a venv is not really required

@neersighted
Copy link
Member

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.

Copy link

github-actions bot commented Mar 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

5 participants