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

poetry env delete and poetry env list should be able to deal with broken envs after a Python upgrade #9389

Open
ilyagr opened this issue May 5, 2024 · 0 comments
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@ilyagr
Copy link
Contributor

ilyagr commented May 5, 2024

Issue Kind

Change in current behaviour

Description

I ran into #6841, and it is difficult to recover from. I believe the cause of the problem was that the python symlink inside the virtual env pointed to a binary that no longer existed on my system

I wish that:

  1. poetry env delete --all worked in that situation. It currently fails with [Errno 2] No such file or directory: 'python'. Ideally, poetry debug info would also work. It currently prints some information, but fails in the same way before printing the useful information of where the virtualenvs are.
  2. the error messages suggested I use poetry env delete.

Impact

See above

Workarounds

One can check that poetry config virtualenvs.path is set to a sensible value (DO NOT SKIP THIS PART) and then run rm -r $(poetry config virtualenvs.path)/*.

This is taken from #6841 (comment), which suggested running the above with rm -rf, but judging by the rest of the thread, many people did not check that poetry config virtualenvs.path is set to a reasonable value and nuked large parts of their system. 😬

@ilyagr ilyagr added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant