-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
Usage of PYENV_DEACTIVATE? #121
Comments
It is used to persist the state of manual deactivation ('pyenv deactivate') if there is pyenv-virtualenv-init is enabled. |
I see. But then a manual "pyenv activate" should not be blocked, right? What about a new switch "--auto", which would be used by the automatic handler, which then would respect this var? Basically this means that |
Manual activation with |
So basically if i have the virtualenv-init set and still do the manual activation (say because i don't always have/ want to be ina specific dir to have it activated - i need to move around in a terminal), with the changed your pushed for review a user will have to
Note - not place for both anymore |
@DanyC97 So, what is your use case of manual activateion/deactivation with enabling auto-activation feature? |
@yyuu so the use case (is more like how i do things) is:
with the current situation i don't have to fiddle with my bashrc config to add/ take out the virtualenv init part |
@DanyC97 Although, you cannot do manual deactivation of global or local version since pyenv-virtualenv's hook function always tries to activate if pyenv's current version is a virtualenv. Actually, the deactivation is working. But the hook function will re-activate it just after the deactivation. The activation in pyenv-virtualenv is now just a declaration of environment variable |
the manual activation i do need/ use because as i said i don't always stay on a single directory to benefit from auto-activation however when i do need it i would like to not go again and add Most of the time i do use it with Pycharm (unfortunately it doesn't support pyenv only virtualenv) and so most of the time i manually enable so i can "view" the new interpreter in Pycharm. |
@DanyC97 Apart from that, you might want to try https://github.com/direnv/direnv or https://github.com/Tarrasch/zsh-autoenv, which would allow you to handle it manually altogether: e.g. with zsh-autoenv, you could explicitly activate an env when entering a dir, and deactivate it when leaving (simulating what virtualenv-init provides). |
@blueyed thanks for options |
What is
PYENV_DEACTIVATE
useful for?It makes you use
--force
to re-enable the same virtualenv again:From skimming the git log for it, it looks like it might be obsolete / not required anymore?!
The text was updated successfully, but these errors were encountered: