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
When running pyenv-venv activate in a PowerShell session in Windows Terminal, the activated venv uses Windows CLI instead of PowerShell.
The pyenv-win-venv.ps1 script uses $MyInvocation.MyCommand.CommandType -eq "ExternalScript" to determine whether to use the activate.bat or the Activate.ps1 file to activate the venv. This always evaluates to "ExternalScript" since the pyenv-venv command is triggering the script, from which the command is then run.
I resolved locally by changing the check in the pyenv-win-venv.ps1 file to:
Windows Terminal, PowerShell session. I checked PowerShell ISE to determine if an issue with Windows Terminal and found that the original code hangs until cancelled on my system but my updated code successfully activates the venv so the ISE failure when using the repo code may just be local issue.
Python version 3.13.0a2
pyenv-win and pyenv-win-venv installed using PowerShell on 2024/04/01, so whatever versions were pulled as latest on that day with the install scripts; sorry, can't find version info for them specifically to verify.
The text was updated successfully, but these errors were encountered:
When running pyenv-venv activate in a PowerShell session in Windows Terminal, the activated venv uses Windows CLI instead of PowerShell.
The pyenv-win-venv.ps1 script uses
$MyInvocation.MyCommand.CommandType -eq "ExternalScript"
to determine whether to use the activate.bat or the Activate.ps1 file to activate the venv. This always evaluates to "ExternalScript" since the pyenv-venv command is triggering the script, from which the command is then run.I resolved locally by changing the check in the pyenv-win-venv.ps1 file to:
Environment:
The text was updated successfully, but these errors were encountered: