I have installed venv using python3 with fish like and activated using env/bin/activate.fish, but there is no deactivate.fish in env/bin/
➜ ls env/bin/
activate activate.fish easy_install pip pip3.7 python3
activate.csh chardetect easy_install-3.7 pip3 python yapf
how can I deactivate venv?
You can deactivate a virtual environment by typing “deactivate” in your shell. The exact mechanism is platform-specific and is an internal implementation detail (typically a script or shell function will be used).
To deactivate: This exits the entire shell the venv is in, and drops you back to the original shell from before the activation script made any changes to the environment.
In opposite to activate
, deactivate
is implemented as a shell function, not as a shell script or binary in env/bin
. You can verify that by running:
type -t deactivate
function
To run the function and deactivate the virtualenv, just run deactivate
PS: This behaviour is the same for all shells, it is not special to fish
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With