一、官方网址
linux:https://github.com/pyenv/pyenv
windows:https://github.com/pyenv-win/pyenv-win#installation
二、这边使用git安装
git clone https://github.com/pyenv-win/pyenv-win.git "$HOME/.pyenv"
三、安装后
powershell中执行
[System.Environment]::SetEnvironmentVariable('PYENV',$env:USERPROFILE + "\.pyenv\pyenv-win\","User")
[System.Environment]::SetEnvironmentVariable('PYENV_HOME',$env:USERPROFILE + "\.pyenv\pyenv-win\","User")
如果powershell阻止,请用管理员打开powershell
执行下面代码,选择全是
set-executionpolicy remotesigned
四、再次执行
[System.Environment]::SetEnvironmentVariable('path', $env:USERPROFILE + "\.pyenv\pyenv-win\bin;" + $env:USERPROFILE + "\.pyenv\pyenv-win\shims;" + [System.Environment]::GetEnvironmentVariable('path', "User"),"User")
1167



被折叠的 条评论
为什么被折叠?



