You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using pyenv-win on my Windows computer successfully through PowerShell. However, the pyenv shell command is not working when I'm using it on a Git bash terminal. It does not output any error but it does not set the PYENV_VERSION environment variable and pyenv versions is not showing that the right Python version has been chosen.
Install two python versions pyenv install 3.11.4pyenv install 3.8.10
Run pyenv global 3.11.4
Open a git bash terminal then type pyenv shell 3.8.10
Run pyenv versions and eventually python -V
Expected behavior
I'm expecting pyenv versions to indicates that the version 3.8.10 is actually set and python -V should output Python 3.8.10
Desktop
OS: Windows 10 Enterprise
Tools used: Git for windows (git bash)
Version: 3.1.1
Additional context
I've actually tried to export the PYENV_VERSION environment variable by myself to test and it looks like it is properly working this way
What happens: if the pyenv shell ... command finishes successfully, the arguments are reused to unset or export the PYENV_VERSION variable, depending on what was requested.
pyenv comes with the init command that takes care of this, after adding eval "$(pyenv init -)" to ~/.bashrc. Maybe the proper solution would be to port it to pyenv-win?
Sorry, for late reply. I gave it a try and worked like a charm. This is a nice workaround for me at the moment but as you mentioned this might be handled by pyenv-win itself. Maybe a first step could be to at least document this somewhere.
Hello,
I'm using pyenv-win on my Windows computer successfully through PowerShell. However, the
pyenv shell
command is not working when I'm using it on a Git bash terminal. It does not output any error but it does not set thePYENV_VERSION
environment variable andpyenv versions
is not showing that the right Python version has been chosen.Following is the output I've got from pyenv
To Reproduce
Steps to reproduce the behavior:
pyenv install 3.11.4
pyenv install 3.8.10
pyenv global 3.11.4
pyenv shell 3.8.10
pyenv versions
and eventuallypython -V
Expected behavior
I'm expecting
pyenv versions
to indicates that the version3.8.10
is actually set andpython -V
should outputPython 3.8.10
Desktop
3.1.1
Additional context
I've actually tried to export the
PYENV_VERSION
environment variable by myself to test and it looks like it is properly working this wayThank you!
The text was updated successfully, but these errors were encountered: