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

Permission denied when attempting poetry self update --preview #4426

Closed
3 tasks done
bennylut opened this issue Aug 23, 2021 · 5 comments
Closed
3 tasks done

Permission denied when attempting poetry self update --preview #4426

bennylut opened this issue Aug 23, 2021 · 5 comments
Labels
status/needs-reproduction Issue needs a minimal reproduction to be confirmed

Comments

@bennylut
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.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Linux Mint 19 Cinnamon
  • Poetry version: 1.1.8

Issue

I installed poetry using the new install-poetry.py script as described here.
I then proceeded to attempt and upgrade to 1.2.0a2 by running the command:
poetry self update --preview and got the following error:

 EnvCommandError

  Command ['pip', 'uninstall', 'urllib3', '-y'] errored with the following return code 2, and output: 
  Found existing installation: urllib3 1.22
  Uninstalling urllib3-1.22:
  ERROR: Exception:
  Traceback (most recent call last):
    File "/usr/lib/python3.6/shutil.py", line 550, in move
      os.rename(src, real_dst)
  PermissionError: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages/urllib3' -> '/tmp/pip-uninstall-m6nzl8u_'
@bennylut bennylut added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Aug 23, 2021
@Kurt-von-Laven
Copy link

I am able to replicate this when I attempt poetry self update from 1.1.8 to 1.1.10 or poetry self update --preview from 1.1.10 to 1.2.0a2. I also used the new install-poetry.py script and am running Ubuntu 21.04.

  - Updating certifi (2020.6.20 /usr/lib/python3/dist-packages -> 2021.5.30)

  EnvCommandError

  Command ['/usr/bin/pip3', 'uninstall', 'certifi', '-y'] errored with the following return code 2, and output: 
  Found existing installation: certifi 2020.6.20
  Uninstalling certifi-2020.6.20:
  ERROR: Exception:
  Traceback (most recent call last):
    File "/usr/lib/python3.9/shutil.py", line 806, in move
      os.rename(src, real_dst)
  OSError: [Errno 18] Invalid cross-device link: '/usr/lib/python3/dist-packages/certifi' -> '/tmp/pip-uninstall-0btivxm3'

@ruancomelli
Copy link

For anyone getting a similar error, I was able to update to v1.1.12 by running:

$ exit
$ deactivate
$ poetry self update

@jedie
Copy link

jedie commented Nov 13, 2022

Maybe it's duplication of #5490 and the real problem is pypa/setuptools#3278 ?

@neersighted
Copy link
Member

I'm closing this as there is no reproduction overall; this appears to mostly be an artifact of trying to self upgrade a distro-installed Poetry (which will not work). @jedie this is unrelated to #6371 or pypa/setuptools#3278.

@neersighted neersighted closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2022
@neersighted neersighted added status/needs-reproduction Issue needs a minimal reproduction to be confirmed and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Nov 13, 2022
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
status/needs-reproduction Issue needs a minimal reproduction to be confirmed
Projects
None yet
Development

No branches or pull requests

5 participants