-
Notifications
You must be signed in to change notification settings - Fork 8
Description
-
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: Ubuntu 20.04
-
Poetry version: 1.1.13
Issue
Often times poetry
keeps thinking I have a shell already activated, and I don't. This is widely reported by others too (#4622, #21, python-poetry/poetry#5050, python-poetry/poetry#3136). I also do not have any conda environment activated (not even base
). In this case, I am just forced to use the full path to the venv
to run the activate
script manually. I propose that we should be able to do this in poetry
, when it inevitable fails to activate the venv, to --force
activate the environment, so that even if it is "already active" (not actually), it will still be "activated" (for the first time).
Current output
$ poetry shell -vvv
Using virtualenv: ...-py3.8
Virtual environment already activated: ...-py3.8
Proposed Usage example:
$ poetry shell
Virtual environment already activated: ...
$ poetry shell -f
Force-activating Virtual environment: ...