https://github.com/pyenv/pyenv/blob/master/COMMANDS.md
pip install pyenv-win --target d:/.pyenv
执行下面3行代码
# 涉及到注册表问题,这里必须“以管理员身份运行”选项启动 Windows PowerShell
> Set-ExecutionPolicy AllSigned
> Set-ExecutionPolicy -Scope CurrentUser Unrestricted
> Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
# 添加执行Win11执行脚本权限
> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
https://blog.csdn.net/weixin_43031092/article/details/113412866
添加path
D:\.pyenv\pyenv-win\bin
D:\.pyenv\pyenv-win\shims
官方文档
https://virtualenv.pypa.io/en/latest/
pip install virtualenv
# 添加执行Win11执行脚本权限
> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# 创建虚拟环境
python -m venv env
# 进入虚拟环境
cd env/Scripts && activate && cd ../../
https://stackoverflow.com/questions/74966861/activating-python-virtual-environment-on-windows-11