poetry
poetry copied to clipboard
feat: poetry env remove should display full path if using in-project virtualenvs
Issue Kind
Change in current behaviour
Description
Here's me trying to delete the venv that was created locally by poetry (doing this for vscode compatibilty)
It wasn't obvious that the env to remove needed a full path
So I had to do poetry env remove --all
Which of course may not be desirable for people
I suggest a helper message
If using local in-project virtualenvs be sure to specify the full path of the venv
or always displaying the venv path
teto@Ashleys-iMac InternHelper % poetry env list
.venv (Activated)
teto@Ashleys-iMac InternHelper % poetry env remove \.env
[Errno 2] No such file or directory: '.env'
teto@Ashleys-iMac InternHelper % poetry env remove \.\env
[Errno 2] No such file or directory: '.env'
teto@Ashleys-iMac InternHelper % poetry env remove \.\venv
[Errno 2] No such file or directory: '.venv'
teto@Ashleys-iMac InternHelper % poetry env remove ".venv"
[Errno 2] No such file or directory: '.venv'
teto@Ashleys-iMac InternHelper % poetry env remove --help
Description:
Remove virtual environments associated with the project.
Usage:
env remove [options] [--] [<python>...]
Arguments:
python The python executables associated with, or names of the virtual environments which are to be removed.
Options:
--all Remove all managed virtual environments associated with the project.
-h, --help Display help for the given command. When no command is given display help for the list command.
-q, --quiet Do not output any message.
-V, --version Display this application version.
--ansi Force ANSI output.
--no-ansi Disable ANSI output.
-n, --no-interaction Do not ask any interactive question.
--no-plugins Disables plugins.
--no-cache Disables Poetry source caches.
-C, --directory=DIRECTORY The working directory for the Poetry command (defaults to the current working directory).
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
teto@Ashleys-iMac InternHelper % poetry env remove --all
Deleted virtualenv: /Users/teto/textbook-search/InternHelper/.venv
teto@Ashleys-iMac InternHelper %
Impact
User experience improvement
Workarounds
Current workaround is to increase your skill with poetry and python